The Rat: C-- compiler for AVR

The Rat AVR

When writing code on assembly language, there is a desire to have a more convenient syntax, similar to the syntax of C, where familiar and more readable constructs can be used instead of assembly mnemonics. Similar to how it is done in C--. This prompted me to create a language and compiler for the AVR microcontroller, which allows you to write very compact and very fast code.

Chip tester

Chip Tester

The device is designed to test logic integrated circuits: TTL and CMOS (74, 40, and 45 series), SRAM, DRAM and EEPROM, can also test some operational amplifiers, optocouplers sensors, and more. Menus and results are displayed on a 128x128 color display.

The device is powered by the miniUSB port, through which it can also be connected to a computer. The software allows you to develop and debug tests, read the contents of ROM, start testing chips with the display of results and update the firmware.

AVR UART Baud Rate Calculator

UART baudrate calculator

Online UART bitrate calculator for AVR-microcontrollers. By default, you can get a list of the UBRR settings for many popular clock speeds, and serial port bit rates. But you can tell it what serial port bit rate you want, and it will tell you all the possible clock speeds that will generate your desired serial port bit rate. You can also give it a clock speed, and it will tell you all the possible serial port bit rates that can be producted with that clock speed.

AVR builder utility

Atmel Studio and avr builder

Atmel Studio is available only for Windows users. Alternatively, you can use any liked text editor with some utility to build the project. Atmel Studio uses the make utility to build the project and generate makefile file for this. In general, the makefile can be written by hand, but it seems to me very uncomfortable and unwieldy. I also tried to use other build systems (cmake, scons etc.) but the results I also didn’t like. I wanted to have a very simple, user-friendly and flexible tool for building projects. As a basis I took the Python language, because it is easy to use, not only for writing the build system, but also as a convenient language for describing the configuration of the project.

Adapter to connect a PS/2 mouse to a serial port

 ps/2 to serial

If you still have an old computer, the problem is to connect to it modern mouse may be familiar to you. Old mechanical mouse, sooner or later come into disrepair - cable wear, buttons do not work, etc. In general, modern laser mouse is usually much nicer than the devices of the last century

Because the serial mouses are no longer produced, then the for PC without a PS/2 port is still two options: adapt the PS/2 or USB mouse. With PS/2 mouse everything is much easier - this protocol can be implemented in almost any microcontroller, such as ATMega8.

The adapter is built on ATMega8 microcontroller and uses MAX232 to match the TTL signal levels with a serial port levels. The microcontroller receives data from the PS/2 mouse and transmits them via the UART.

trolCommander v0.9.8

trolCommander 0.9.8

Released a new version of trolCommander (0.9.8). It included many improvements to the text viewer and editor, working with archives, MacOS X utilities, and so on.

Tape player and recorder for Sinclair ZX Spectrum on Atmega128

ZX tape simulator for zx spectrum

ZX Spectrum - a computer designed over 30 years ago with a 3.5 MHz processor and only 48 KB of RAM. For him, it developed a huge number of software and games. Moreover, new game releases are constantly in our days.

Previously, the program is loaded from the tape. And the loading is not always succeeds, sometimes the game had to try several times to load often getting message "R Tape loading error".

Alternatively audiotapes today suggests a memory card that stores the program files in the formats TAP, WAV and TZX. And as an alternative to tape recorder - microcontroller device that can play and store these files.

Two microcontroller regulators for fans

Two microcontroller regulators for fans

This device allows to reduce the noise from cooling fan. It turn off the fan or reduces the rotation speed depending on the temperature of the radiator. Also the device beeps when temperature exceeds a threshold. There are two variants of device for fans of different power.

The first variant is designed to control 12-volt computer fan, and has been fully implemented on the SMD-elements:

Mood Lamp on ATTiny13

Moodlamp on ATTINY13

Mood lamp is a LED RGB lamp that changes the color of light at random. There are a lot of mood lamps projects in the Internet and usually they use relatively "big" microcontrollers. I wanted to make a lamp based on simply ATTiny13 microcontroller.

The circuit of the device is very primitive and shown in the figure below:

Christmas Icicle

Christmas led icicle on microcontroller

This LED "icicle" made from mainly blue LEDs. This device can serve as Christmas present or New Year's ornament. The "icicle" can be transformed into a "candle" if to use red and yellow LEDs and to change accordingly its external design. As the body I used two fur-tree toys: transparent plastic icicle and one-half of the Christmas ball. LEDs are placed in the first and second placed the microcontroller board.


Subscribe to AVR