|
|
View previous topic :: View next topic |
Author |
Message |
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Fri Jan 21, 2005 8:45 pm |
|
|
OK a few things off the top of my head:
1) If possible, don't keep hacking stuff into this board. It is just going to get more and more frustraiting You can get relatively inexpensive evaluation and development boards for PICs. For example CCS sells a nice little board with a PIC16F877A, voltage regulator, RS232 port and connector for all the available I/O. Get one with the bigger PICs, the 16F877A or 18F452 make good chips for playing with C. Nice to have a little more RAM / ROM so you are less likely to hit that brick-wall when you write your code.
2) Are your LED matrix parts similar to the Rohm LM-2256 modules? Those are very easy to work with. You need to provide row and column drive. If you want to access them serially, that is send out a serial data stream hand have the displays update you can use 74HC595 chips to run the rows and columns. Control the data line, the data clock, the output register clock and also modulate the enable pin of the chips so you aren't exceeding their current limitations. The modulation is done with the PIC's CCP module so there is no program overhead once you start the module running. I can draw some schematics and email them if you need more information, or give me the exact part number of the module you are using and I will see what I can find about it.
3) If you don't already know C, this is NOT the way or time to learn it. Go get yourself a copy of Kernigahn and Ritchie's (spelling?) book "The C Lanugage", second edition. You can practice on your PC using Dev-C++/Bloodshed. Free and pretty good for small stuff on PCs. There are a handfull of books around for embedded C programming but most of them assume you already have some background in C programming.
4) Get a nice ICSP to use. Microchip recently had the ICD2 on sale and there are several "clones" available. Search this forum and Google for "icd2". CCS has a nice ICSP that supports the in-circuit debugging available on many of the PICs, about $75.
5) Get some clean sheets of paper and write down in detail (verbal detail, not code or schematics or picking I/O pins) EXACTLY what you want to accomplish. Take this document and expand it by adding block diagrams and flow charts. Next expand again by filling in schematics and code. Test, debug, repeat. A bit over simplified but writing design requirements for even a simple project is a step often skipped! _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
Sugiman
Joined: 12 Jan 2005 Posts: 15
|
|
Posted: Wed Jan 26, 2005 8:46 am |
|
|
Thanks for the input Rob, it was very helpful. I'm somewhat familiar with C, just having a hard time making the jump to microcontrollers and such. I have a book about programming embedded systems in PIC-C but I'm having a hard time wrapping my head around it.
Quote: | 2) Are your LED matrix parts similar to the Rohm LM-2256 modules? Those are very easy to work with. You need to provide row and column drive. If you want to access them serially, that is send out a serial data stream hand have the displays update you can use 74HC595 chips to run the rows and columns. Control the data line, the data clock, the output register clock and also modulate the enable pin of the chips so you aren't exceeding their current limitations. The modulation is done with the PIC's CCP module so there is no program overhead once you start the module running. I can draw some schematics and email them if you need more information, or give me the exact part number of the module you are using and I will see what I can find about it. |
The matrix parts are quite similar to the Rohm one. It's the one with all red LED's. It's a Kodenshi P161MAN-BA. So, for a 16x16 matrix (x4) how many 74HC595 chips would I need and how many free ports coming from the PIC chip? I'm going to rebuild the board using a universal PCB to make things easier on myself. I raised my frustrations to them and they realized it wasn't so easy in fact to alter this board for my first attempt at this kind of thing.
I looked at some 7-segment multiplexing samples and it made some sense. I think I understood most of it, but couldn't find any info on how exactly to send the latch pulse to shove the data into the LED's |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
|
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Wed Jan 26, 2005 9:56 am |
|
|
Sugiman wrote: | Thanks for the input Rob, it was very helpful. I'm somewhat familiar with C, just having a hard time making the jump to microcontrollers and such. I have a book about programming embedded systems in PIC-C but I'm having a hard time wrapping my head around it.
The matrix parts are quite similar to the Rohm one. It's the one with all red LED's. It's a Kodenshi P161MAN-BA. So, for a 16x16 matrix (x4) how many 74HC595 chips would I need and how many free ports coming from the PIC chip? I'm going to rebuild the board using a universal PCB to make things easier on myself. I raised my frustrations to them and they realized it wasn't so easy in fact to alter this board for my first attempt at this kind of thing.
|
The 74HC595's have 8 output pins so you would need 4 per matrix to fully control the row and column. Depending on how much current you expect to sink and source you may also need to add some buffer FETs or BJTs so you aren't stressing the HC595.
The 74HC595 needs 4 control lines from the PIC. Add a 5th line to modulate the enable pin and you can control the brightness.
Another choice would be to have byte-wide registers like the 74HC273. For those you will need 8 lines per register plus 3 more to run a 3:8 decoder for selecting the registers. Add one more pin to modulate the brightness on the LEDs. And again you may need some FETs or BJTs to provide the necessary current drive.
Other choices to consider are the Maxim MAX6952 and MAX6953.
Another choice would be to to use a 4:16 selector to pick the column or row and drive the opposite side (probably through some kind of buffer). There you will be scanning the matrix similar to the way you run a keyboard switch matrix.
Directly driving (static drive) the matrix is conceptually the simplest but least efficient chip count wise and power consumption wise. Using a scaning technique is more efficient in power and part count but requires more complexity in the PIC code.
Mark's links should be very helpfull in finding out more about these topics. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
Sugiman
Joined: 12 Jan 2005 Posts: 15
|
|
Posted: Thu Jan 27, 2005 12:12 am |
|
|
Thank you both for all the help and advice. I'll give this all a shot and let you know how it goes.
Thanks again! =) |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|