Step 10RSS Reader using Serial Connection and LCD
Hardware
We are using the Dragon Rider 500 as a development board. This provides all of the hardware you need (assuming you have all of the add-on kits). That being said you certainly can do this with your own hardware setup:
- ATmega8 microcontroller (or any that has a USART and enough pins for all connections
- A way to program the microcontroller (I use the AVR Dragon)
- MAX232 chip for the serial communications
- DB9 connector
- HD44780 LCD screen
- Crystal (I used an 8MHz crystal)
- Assorted capacitors and resistors
On the Dragon Rider we will need to use some creativity to Route the connections. Normally Port D could be connected directly to the LCD header. This is not the case here because the USART needed for the serial connection uses PD0 and PD1. Furthermore, Port B cannot be used because PB6 and PB7 are in use for the external crystal.
Pictured below is my solution to this problem. I plug in a ribbon cable to the headers for the LCD, Port B and Port D, then use jumper wires to make the proper routes. Don't forget to hook up voltage and ground to the LCD header.
Software
The software for this project comes in two parts, the firmware for the microcontroller and the python script for scraping the RSS feeds and sending them over the serial connection.
AVR Firmware
I'm using Peter Fleury's LCD library again (http://jump.to/fleury). It's powerful and concise, versatile, and easy to alter for your hardware setup. If you look at the header file attached (lcd.h) you will see that I'm running in 4-bit mode with Port D as the data bits, and Port B as the control bits.
The concept of this firmware is pretty simple:
- Once powered up the microcontroller displays "RSS Reader" and then waits for serial data.
- Each byte of serial data received causes a buffer of 16 chars to shift left and add the byte to the buffer, then display the buffer.
- Three special commands are accepted by the microcontroller: 0x00, 0x01, and 0x02. These are clear screen, move to line 0, and move to line 1 respectively.
I wrote a pyton script to scrape the RSS data and send it over the serial connection. This requires the python module "pyserial" which you will probably have to install on your system to get this to work.
The RSS feed can be configured at the top of the pyton file. Notice that you need to enter a name for the feed as well as the feed url. There are three examples there, I'm certain you can follow those for the proper syntx.
Making it all work
- Assemble the hardware
- Program the microcontroller (dragon_rss.hex can be used if you don't want to compile this yourself). Fuse settings for ATmega8 using an 8 MHz crystal: lfuse= 0xEF hfuse=0xD9
- Power up the Dragon Rider and make sure the serial cable is plugged in (LCD should read: "RSS Reader")
- Execute the python program (python serial_rss.py)
- Enjoy
Dragon_RSS.zip36 KB| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|













































