Readerboard LED Display Schematics and Source Code for the ATExpo 2006 EASi Line




We've developed the ATExpo 2006 give-away for the EASi Line demonstration and would like to share with you some of the design secrets, source code and binaries so that the little toy you received has long-term value. Essentially, what you received is a 7 by 12 LED matrix, controlled by an Atmel Tiny2313 processor. The board is powered by a 9V battery and will run for hours, displaying any message you want, up to 127 characters.

If you like your display board, you decided to use our project files to make your own or derivative project, or just have a comment in general, please send us an e-mail and let us know!


Project Details
Board Specs Design Considerations
Readerboard Schematics Readerboard PCB Layout
Readerboard Silk Screen Mechanical Layout
Parts List / Bill of Materials PC Interface
Readerboard Source Code Reprogramming
Further Resources



Board Specs   [Back to Top]
Here are the specifications for the LED Readerboard.
  • Processor: Atmel ATTiny2313
  • Power Supply: 9V Battery.
  • Clock Speed: Internal 1 Mhz Oscillator
  • Minimum Power Requirements: 4.3V
  • Current Draw when On: ~ 150 mA
  • Current Draw when Off: 0.0001 mA
  • Interface: RS232
  • Programmable with Atmel AVR tools & AVR Studio 4.0
  • 6 Pin Program Header, Not included
  • Code: Both C and Assembly Available
  • 84 Surface Mount LED's
  • 5x7 Characters
  • 94 Character Set
  • Pushbutton On
  • Auto-Off
  • Reprogrammable Message


Design Considerations   [Back to Top]
The readerboard was designed to be a give-away at the Assembly Technology Expo, and therefore had to meet a number of requirements. The following is a short list of the project design goals:
  • Low cost
  • Equal number of parts on the front and back
  • At least 100 parts in the design
  • Support for an in-system programmer, the Data I/O ImageWriter 2
To keep the end-product useful, we added a few design contraints of our own:
  • Must draw very little or no current when off to extend battery life when not in use
  • With only one momentary push-button switch, system must be able to turn itself off after a period of time
  • RS232 Connection capabilities will allow the end user to change the message when they get home
What we ended up with is the design you'll find here.



Readerboard Schematics   [Back to Top]
Page 1
Page 2
Page 3
Page 4
Page 5


Readerboard PCB Layout   [Back to Top]
Front
Back


PCB Silk Screen   [Back to Top]
Front
Back


Mechanical Layout   [Back to Top]


Parts List / Bill of Materials   [Back to Top]
Resistors
Quantity: References Value Value2 Package Dbnum Notes
11 R1-R8, R22, R23, R25 1K 5% .1W 0603 ERJ-3GEYJ102V  
12 R9-R20 120 .1W 0603    
4 R21, R24, R26, R29 10K 5% .1W 0603 ERJ-3GEYJ103V  
1 R27 720 1% .06W 0603    
1 R28 240 1% .06W 0603    
Capacitors
Quantity: References Value Value2 Package Dbnum Notes
7 C1, C4-C9 .1uf 50V 0603 C1608X7R1H104K  
2 C2, C3 18pf 50V 0603 ECJ-1VC1H180J  
Integrated Circuits
Quantity: References Value Value2 Package Dbnum Notes
1 U1 ATTINY2313   SOP20.375 58023130  
2 U2, U3 74HC595   SO16    
1 U4 LM317LDR2   SO8    
Transistors
Quantity: References Value Value2 Package Dbnum Notes
9 Q1-Q8, Q10 MMBT3904   SOT23_MMBT3904 MMBT3904DICT  
1 Q9 MMBT3906   SOT23_MMBT3906 MMBT3906DICT  
Diodes
Quantity: References Value Value2 Package Dbnum Notes
84 D1-D84 GRN 0603   0603_LED LTST-C190GKT  
Miscellaneous
Quantity: References Value Value2 Package Dbnum Notes
1 J1 9V-CLIP   CONN PCB 9V 9V_CLIP  
1 J2 CONN-H10   10 PIN EDGE CARD    
1 J3 AVR PGM   CONN-DIL6 30010060  
1 J4 CONN-H2   SIL2_.10 SIL2  
1 J5 CONN-H10   CONN-DIL10-RIB    
1 SW1 SPST   B3F-1000 B3F-1000  
1 X1 1.8432mhz   SMT_CSM7   Optional


PC Interface   [Back to Top]
The readerboard interfaces with a PC through an RS232 connection. If your PC does not have an RS232 connection, there are USB to RS232 adapters widely available that work quite well, and may be a cheaper route for you than purchasing an RS232 cable if you don't already have one. The board does not come stuffed with either a RS232 9 pin connector or headers. You must supply your own connector, which can be easily found at any Radio Shack, Digikey or other online store. You want to get a RS232 DB9 female connector with exposed ends so that you can easily solder, or alternatively you can take an existing RS232 DB9 cable, cut it in two and work with it. Either way, you just need to get your hands on it and you're off.

The solder points for the RS232 connection are through-hole and located where you see the arrow pointing to in the figure, just above the programming header to the left of the 9V battery clips. This is a two wire connection, labeled J4, that represents system ground and Rx (receive).

J4 Pinout
Pin     Function    Connect To DB9 Pin
1    Rx/Receive    
3
2    System Ground    
5


RS232 DB9 Pinout
Pin  Function
1  n/a
2  Receive
3  Transmit
4  Data Terminal Ready
5  System Ground
6  Data Set Ready/Carrier Detect
7  Request to Send
8  Clear to Send
9  n/a


To have the PC properly communicate with the readerboard, you must short certain pins on the female header. Follow this table of cross pin shorts.

RS232 DB9 Cross Pin Shorts
Pin   Cross ToPin
7  8
6  4


Once you have the connector shorted and soldered or connected to the readerboard, you are ready to hook it up to your PC. Using an RS232 extension cable, or by plugging it directly into your PC's RS232 port (or USB adapter). Then, simply launch HyperTerminal, which is usually located under Communications in your Start Menu Accessories folder on Windows PC's. If HyperTerminal is not installed, you can install it through the Control Panel Add/Remove programs, or you can use any number of COM port programs. You just need to open a connection up to your device.

Use the following connection settings in HyperTerminal or other COM port program:
  • Baud Rate: 4800
  • Data Bits: 8
  • Parity: None
  • Stop Bits: 1
  • Flow Control: None
When the connection is open, you must first send a capital "M" to open up the communications with the device. Once you have sent an "M" to the board, you will see a blank space and an empty progress bar. Now, you are free to type virtually any character on your keyboard. Most will be recognized by the readerboard, but not all keys map to the board. For example, the function keys do not map to a character on the board and they will result in a garbage display. As you type, you will see the character you typed displayed on the screen plus a progress bar which will indicate how full the memory is. As you approach the 127 characters that the processor can store in its ee-prom, the progress bar will fill up. When it reaches 127 characters, or when you are finished typing in a message, it will display a capital "D" for "Done" and the progress bar will be full. If your message is not a full 127 characters, press the "Enter" key to save your message and the "D" will display. The "D" will display for a short time and then you will be prompted with "S?". S stands for scroll speed, and you are free to type in a number, 1 through 9, where the higher the number the higher the scroll speed. Once you have typed in a number, the readerboard saves the speed into ee-prom and the device will begin displaying your new message.



Readerboard Source Code   [Back to Top]
AVR Assembly Source:
  • EASiLine.asm
  • TN2313def.inc
  • EASiLine.inc

    C Source:
  • Main.c
  • Font.h

    Binaries:
  • Assembly Binary
  • C Binary


    Reprogramming the Atmel ATTiny2313 AVR Processor   [Back to Top]
    In order to reprogram the board, you'll need to purchase an appropriate programmer and you'll need to use either the AVR Studio assembler or appropriate C compiler. Assembling or compiling the source is beyond the scope of this document. Your output should be in Intel hex format. We recommend the Atmel JTAG ICE mk-II debugger/programmer, with which you can use Atmel's AVR Studio software to reprogram the board. Reprogramming the board once you have this device is easy.

  • First, attach the 6 pin program header to the 10 pin header attached to the mk-II device. Pin one is the pin on the 6 pin header marked with an arrow.
  • Solder on a six pin header block to the PGRM labeled J3 through hole connections on the device, near the RS232 J4 connector. Pin 1 is the bottom right hand pin.
  • Match this up with the pin one from the header (arrow) and attach the mk-II to the board.
  • Power the board with a 9V battery. Do not use a power supply as the floating grounds may blow your mk-II board.
  • Launch AVR Studio and connect to the mk-II device through the Tools->Program menu.
  • Click the Program tab. Choose the ATTiny2313 device.
  • Choose the Board tab and select an ISP frequency of 125 kHz. Write this value to the programmer.
  • Click the Advanced tab and read the Signature Bytes. You should get 0x1E 0x91 0x0A
  • Click the Fuses tab and read the fuses. You should get 0xFF 0xDF 0x64. Do not attempt to reprogram unless this information is accurate.
  • Choose the Program tab again and set the device to Erase Device before programming. Choose your hex file with the "..." browse button.
  • Click "Program" to reprogram your board.



    Further Resources   [Back to Top]
  • Assembly Technology Expo
  • Data I/O





  • Copyright 2007 CPU Ready Consulting Inc.
    Yaktrax on sale at Great Outdoors Depot.com