If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Yes Joe, I agree. The 16F84 is plain Vanilla and a good place to start. You can of course get PICs with more functions, more code space, more I/O pins and all that at a cheaper price, but that is not necessarily what a beginner needs. The additional functions mean additional complexity either in setting them up or even just disabling the functions your not using.
Today I was using (the humble) 12F509 for the first time. I had RTFM and subsequently set weak pull-ups and configured the TRIS register for the appropriate I/O. But, I just couldn't understand why my simple program wasn't producing an output on GP2. So, I added a temporary blinky on another pin and that was working. I redirected the output to that pin and my program was definitely working. I knew it had to be down to configuration. It was time to RTFM (again!) or more accurately RTFDS (...Data Sheet).
And there it was a small note on page 24 of 98:
<i>Note: If the T0CS bit is set to ‘1’, it will override
the TRIS function on the T0CKI pin.</i>
Bingo! I disabled TOCS with OPTION_REG.5 = 0
My program was now working properly
To get to the point I was trying to make - it is precisely these sort of quirks that stop a newcomer dead in their tracks, with a little bit more experience you can find your way round them. So I think a "plain Vanilla" chip is best to start with, get your feet wet, then move on to something slightly more advanced.
Pat. Pending
I guess I was more fustrated at the ebay vendor for not providing the code or schematic.
If these is a way to paste a picture here I would. I have a few 16F887 and 16F877 40 Pin Pics laying around to use. I am trying to figure out how the board has the two 74HC425s configured as it appears it is using Pic Pins 2-5, 7-11 and 15-25 for the columns via the transistors (20) to the LED columns.
It also looks like pins 33-39 are connected to pins 2-8 of the 74HC425 chip #1 while there is crossover to the second HC425 chip via pin 2 to pin 18 on chip #2.
The LED Matrix have red or green outputs which are controlled by toggle switch. And it appears swith 29 & 31 are conected to ground via push button switches.
** Is there a way to paste the photo of the board?
Last edited by roycarlson; - 4th August 2008 at 04:35.
Have a look at this thread. Talks about inline pictures. Or just do an attachment.If these is a way to paste a picture here I would.
http://www.picbasic.co.uk/forum/showthread.php?t=9156
Dave
Always wear safety glasses while programming.
I have not been able to find the data sheet for the shift register you have.
Basically there are three pins on the shifter that need controlled and one sometimes two can be paired up when using multiple shifters. (shifters being in or out).
If I remember correctly, parralax has good documentation somewhere about how to make a shifter work with a stamp.
If someone else does not get to it first, I will dig up a snippet when I get home and post it for you.
Dave
Always wear safety glasses while programming.
Here is a little bit that may get you started. The PBP manual will help to explain some.
Now the fun part, if you have the data sheet for the shifter it will help.Code:'Pin setup include "modedefs.bas" ' The clock and load pins can be shared_ 'on all shifters 'Data pins are for each shifter Clock var PORTB.7 Load var PORTB.6 Data_1 var PORTB.5 Data_2 var PORTB.4 LEDs_1 var byte LEDs_2 var byte 'Send data to the shifter pulsout Load,1 shiftout Data_1,Clock,MSBPre,[LEDs_1] pulsout Load,1 shiftout Data_2,Clock,MSBPre,[LEDs_2]
If it is a serial to parallel register, sending the value of 2 should make the first output pin on the shifter go high, a value of 4 activate the second pin, a value of 6 both pin 1 and 2. And so on. Each pin up is double from the last. To send to multiple pins, add the values for each pin. This is the same for shift in registers.
This is interesting
http://www.eelab.usyd.edu.au/digital...egister03.html
Dave
Always wear safety glasses while programming.
Hi Roy, Hi Mackrackit,
Have you unzipped Trent's 245 LED post, I have , he provides a nice VB program to send data to his display, all the code, a pdf article on building it, and the code is in PBP, a good read to be sure. http://www.picbasic.co.uk/forum/showthread.php?t=6033 BTW that 74HC425 is either very obscure or the number is either been <font color=red>misread</font color> or is someone's house numbered device, without seeing the schematic it is hard to guess what it really is.<br> Mackrackit, thanks for that last post, a good study.
Last edited by Archangel; - 5th August 2008 at 01:22.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks