Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
LinkBack Thread Tools Display Modes
Old 1st May 2007, 04:16 PM   (permalink)
Unhappy pic driving shift register driving leds

Hi Guys...
Im realy sorry if this might be a stupid question but im realy struggling to finish a what seems to be fairly simple project. I have to design a theatre headlamp containing leds. A footswitch should then increment the amount of leds ON when pushed. I used a pic16f627 to clock a 74164 shift register with highs. It doesnt wana work though. Firstly the leds dont remain on and secondly the leds increment in a weird order. I desperately need help. Thank and God bless
Ash...
Ashlume is offline  
Old 1st May 2007, 05:33 PM   (permalink)
Default

Please post a diagram, then we can see whats wrong.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 1st May 2007, 05:35 PM   (permalink)
Default

Not enough info.
Please post your schematic and code.
Please put code inside code tags as in
[ CODE ]
your code
[ / CODE ]
but without the spaces.
3v0 is online now  
Old 1st May 2007, 07:10 PM   (permalink)
Default

Hi,

Well, seems pretty simple to me. The 164 only has 8 outputs, so all you need is 8 numbers. If you wish to have a 'bargraph' type look, with each LED turning on in turn, with the LED's behind it staying on, then the 8 numbers would be (2^t-1). Eg, 1,3,7,15,31,63,127,255.

That is, if you're using a PIC simply to send bytes to the shift register. You'll also need a little serial routine generating the clock and data lines. You might not even need a PIC, its a bit overkill, but that just makes the job easier (software debugging is easier than hardware debugging). I would reset the shift register on power up, as the registers can have a random state when initially powered, and since it doesn't have a buffer, it'll be displayed on the output.

I would advise you use the 74HC595, as this has an output register, so the 8 outputs from the SR only change when you make the strobe line on it low->high. The 164 simply has the state of each register connected to its output pins, it'll still work though.

Have you rifled through the datasheet for the 164? The pin's aren't in order, they're split either side on the chip, with 4 outputs on one side and 4 on the other. Also, from memory, the outputs go QA to QF.

As the others have said, its difficult to know whats up without a schematic and code. I still say, you probably don't need a PIC, its just another thing to go wrong, try breadboarding just the shift-register and LED's, with a button for the clock.

Blueteeth
__________________
Inconsistency is the key to flexibility!
Blueteeth is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Introduction to High Brightness LEDs and Thermal Management Ocelaris Electronic Projects Design/Ideas/Reviews 3 17th March 2007 06:35 AM
Problems with Dual Brightness (Current) LED Tail Lights? Eagle Schematics! Ocelaris Electronic Projects Design/Ideas/Reviews 12 31st December 2006 07:18 PM
Code not working..help Electrix Micro Controllers 15 26th September 2005 12:12 PM
Newcomers, please read! (PIC regarded) Upd. 0xD Jay.slovak Micro Controllers 0 17th April 2005 02:05 PM
using shift and stage register with controller waqar Micro Controllers 0 18th April 2003 07:37 AM



All times are GMT. The time now is 04:41 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker