Micro-controllers for Hobby Projects and Education
The expEYES is developed around a micro-controller. You need a micro-controller development system to do such projects. MicroHOPE is just meant for that. It is a A micro-controller development board for ATmega32 micro-controller, having the following features:
- Programmable through USB port (through Parallel Port also)
- Powered by USB
- Program development using AVR-GCC compiler & the C library
- Edit, compile and upload programs using an IDE (contributed by Vimal Joseph)
- Ready-made functions to access the uC features
- 32 kB Flash, 1 kB EEPROM, 2 kB RAM
- 10 bit 8 channel ADC
- 16 bit Timer/Counter
The Hardware and the IDE are shown below. The output on the LCD display is done by the program displayed inside the editor window. You just have to click on the Compile and Upload buttons. The include file "pmdk_lcd.c" has functions to handle the LCD display connected to the micro-controller. Similar include files are available for using the ADC, Timer/Counter and the RS232 port of the micro-controller, reducing your efforts to get started.
Getting started on Ubuntu:
Install gcc-avr , avr-libc and avrdude from the Ubuntu repository. Download and install microHope.deb. The include files and the examples shown below will appear inside /etc/skel/avr-examples. Copy this directory to you home directory and start Applications->Science->microHOPE, to get the IDE shown in the figure.
Developing Programs that can Communicate to the PC
The program echo.c can be used as a starting point to develop programs communicating to PC. After uploading echo.c to microHOPE, you can run echo.py on the PC to test the communication. You can modify this program to send some other information from the micro-controller instead of echoing the character.
Programs can be uploaded to the program memory of the micro-controller using the SPI interface, through the PC parallel port. To do program development through USB port, a bootloader program is pre-loaded in to the program memory.
The bootloader is programmed using the parallel port using the command.
$ avrdude -c dapa -patmega32 -U flash:w:ATmegaBOOT_168_atmega32.hex
The fuses are set by:
$ avrdude -c dapa -patmega32 -U lfuse:w:0xff:m -U hfuse:w:0xda:m
Verification done by:
$avrdude -b 19200 -P /dev/ttyUSB0 -pm32 -c stk500v1 -n
Program uploading through USB port is done by ( you may use the GUI)
$avrdude -b 19200 -P /dev/ttyUSB0 -pm32 -c stk500v1 -U flash:w:mycode.hex
You can make the PCB from these Gerber files.
ajith at iuac.res.in
Infrared Receiver (jithinbp at gmail.com)
recv.c , tested on microHOPE will receive single bytes sent by irsend1(), on Infrared Diode connected to SQR1 .
Download Zip file from http://www.fischl.de/usbasp/
From /usbasp.2011-05-28/bin/firmware/ extract The atmega8 hex file and upload it to an ATMEGA8 using an existing programmer.
Wire the following schematic
(to be completed)