Breadboard Gmail notifier written in Assembly
Report Bug
·
Request Feature
Watch device in live action here
- Buzzer play melody on new mail
- 7-segment display of unread email count (animated)
- LCD display newest email sender and subject
- EEPROM data storage in case of power loss
You always wanted to learn microcontroller programming in Assembly building something useful?
With this project you can learn the basic concepts of AVR MCU programming in Assembly, such as
- Using shift-register for 7-segment display
- Animating digit using Timer/Counter
- Writing to LCD display
- Making tones and melodies with PWM
- Read/Write to EEPROM
- Connecting to PC with UART
Assembly - Atmel Studio 7.0
This breadboard includes home made USBtinyISP programmer. If you have your own, you can skip that part.
As can be seen on breadboard diagram, USBtinyISP Programmer is surrounded by dashed red line. If you wish to build it yourself, here is the schema for it
Following is the bill of materials needed for this project (not including parts for USBtinyISP programmer)
Amount | Part Type |
---|---|
2 | Breadboard |
1 | 74HC164 |
1 | 7-Segment LED Display |
1 | ATmega16 |
1 | FTDI Basic Programmer |
1 | Trimmer Potentiometer |
1 | 330Ω Resistor |
1 | Buzzer 12mm |
1 | LCD-16X2 |
Complete BOM list including parts for USBtinyISP programmer can be found here
To get a local copy of the project up and running, simply
git clone https://github.com/borko-rajkovic/8bit-gmail-notifier
Atmel Studio project is in directory 8bit-gmail-notifier
Once you open project, in Solution explorer (Ctrl + Alt + L
) right click on project name, then on Properties and make sure all is selected as shown here
Make sure you installed WinAVR, connect USBtinyISP programmer to your PC and run
avrdude -c usbtiny -p m16
You should get something like this
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9403
avrdude: safemode: Fuses OK
avrdude done. Thank you.
To read memory and fuses from AVR simply run
avrdude -c usbtiny -p m16 -U flash:r:flash.hex:i -U lfuse:r:low_fuse_val.hex:i -U hfuse:r:high_fuse_val.hex:i
It will write flash memory to flash.hex
, low fuse to low_fuse_val
and high fuse to high_fuse_val.hex
Output should look like this
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9403
avrdude: reading flash memory:
Reading | ################################################## | 100% 16.81s
avrdude: writing output file "flash.hex"
avrdude: reading lfuse memory:
Reading | ################################################## | 100% 0.01s
avrdude: writing output file "low_fuse_val.hex"
avrdude: reading hfuse memory:
Reading | ################################################## | 100% 0.01s
avrdude: writing output file "high_fuse_val.hex"
avrdude: safemode: Fuses OK
avrdude done. Thank you.
You should set up fuses for your chip in following way
Command to set fuses is
avrdude -c usbtiny -p m16 -U lfuse:w:low_fuse_val.hex:i -U hfuse:w:high_fuse_val.hex:i
Output should be similar to writing flash or EEPROM memory, check bellow
Once you run build, in Debug folder there will be two files
8bit-gmail-notifier.hex
- flash memory8bit-gmail-notifier.eep
- EEPROM memory
In order to write to flash memory you should run
avrdude -c usbtiny -p m16 -U flash:w:8bit-gmail-notifier.hex:i
Output should look something like this
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9403
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "8bit-gmail-notifier.hex"
avrdude: writing flash (1560 bytes):
Writing | ################################################## | 100% 2.56s
avrdude: 1560 bytes of flash written
avrdude: verifying flash memory against 8bit-gmail-notifier.hex:
avrdude: load data flash data from input file 8bit-gmail-notifier.hex:
avrdude: input file 8bit-gmail-notifier.hex contains 1560 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 1.64s
avrdude: verifying ...
avrdude: 1560 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
Similar to this, writing to EEPROM should be done with this command
avrdude -c usbtiny -p m16 -U eeprom:w:8bit-gmail-notifier.eep:i
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Borko Rajkovic - LinkedIn - [email protected]