|
Prev: Ethernet in its most basic form
Next: WHOLESALE,FENDI,DIOR,BURBERRY,ARMANI,GUCCI,LV,D&G,DIOR SUNGLASSES
From: Tomás Ó hÉilidhe on 6 May 2008 14:44 A lot of you are familiar with the method of using a shift register to multiplex a matrix of LED's. My college project this year was to make a Connect4 game consisting of a 7x6 matrix of LED's. I had two choices for implementing the display: 1) Use two pins from the microcontroller 2) Use one pin from the microcontroller The technique of using two pins would be something like as follows: 1) Reset the shift register to all zeroes Loop: 2) Set the data input high 3) Clock the shift register 4) Set the data input low 5) Clock the shift register 7 times goto Loop; The method of using one pin would be implemented by feeding the microcontroller pin into a 3-Bit binary counter which feeds into a 3- to-8 decoder. I've been warned against using the one-pin method, people telling me that I could lose sync if "a bit of static" or "a bit of noise" gets in. For my own project board, I went with the one-pin method. I left the board on overnight for three nights in a row and I never lost sync (don't ask me how many million times the display flashed). The only way it ever loses sync is if I terminate the connection to the piezo speaker while the piezo speaker is on (this has the effect of clocking the shift register). So I've two questions: 1) Should we worry about "noise" and "static", or should we rely on the chips doing their job perfectly? Also, does interference only occur on the chip's external pins, or can it occur within the chip itself? If it can occur within the chip then it would seem that microcontrollers are a lost cause... I mean what's the point in writing a program if you can't rely on the microcontroller to execute it reliably? 2) What do you think could be causing the shift register to clock when I terminate the connection to the piezo? If I turn the piezo on and off in software then I don't have the same problem, it only occurs if I physically sever the connection, and it only happens when the piezo is on. Someone suggested putting a capacitor in parallel with the piezo but I'd like to understand what this would do.
From: Arlet Ottens on 6 May 2008 15:18 Tom�s � h�ilidhe wrote: > A lot of you are familiar with the method of using a shift register to > multiplex a matrix of LED's. > > My college project this year was to make a Connect4 game consisting of > a 7x6 matrix of LED's. > > I had two choices for implementing the display: > 1) Use two pins from the microcontroller > 2) Use one pin from the microcontroller > > The technique of using two pins would be something like as follows: > > 1) Reset the shift register to all zeroes > Loop: > 2) Set the data input high > 3) Clock the shift register > 4) Set the data input low > 5) Clock the shift register 7 times > goto Loop; > > The method of using one pin would be implemented by feeding the > microcontroller pin into a 3-Bit binary counter which feeds into a 3- > to-8 decoder. > > I've been warned against using the one-pin method, people telling me > that I could lose sync if "a bit of static" or "a bit of noise" gets > in. > > For my own project board, I went with the one-pin method. I left the > board on overnight for three nights in a row and I never lost sync > (don't ask me how many million times the display flashed). The only > way it ever loses sync is if I terminate the connection to the piezo > speaker while the piezo speaker is on (this has the effect of clocking > the shift register). Some other things that could upset the state, that you might not have tried: - Wiggle the power connector such that the power is briefly interrupted. - Zap the exposed parts with some static electricity. You can charge yourself on a carpet. For best effect, hold some metal object like a screwdriver, and tap your device with it. - Plug some heavy duty electrical equipment into an outlet on the same strip, and quickly power cycle it, or wiggle the prongs in the outlet. - Put your cell phone near the device, and call it.
From: John Speth on 6 May 2008 15:30 > 1) Should we worry about "noise" and "static", or should we rely on > the chips doing their job perfectly? I've a question for you: When was the last time anything was perfect? The question is your How much imperfection can you tolerate? That will tell you how much you need to guard against imperfection. JJS
From: Electroniker on 6 May 2008 17:21 Tom�s � h�ilidhe wrote: > A lot of you are familiar with the method of using a shift register to > multiplex a matrix of LED's. > > My college project this year was to make a Connect4 game consisting of > a 7x6 matrix of LED's. > > I had two choices for implementing the display: > 1) Use two pins from the microcontroller > 2) Use one pin from the microcontroller > > The technique of using two pins would be something like as follows: > > 1) Reset the shift register to all zeroes > Loop: > 2) Set the data input high > 3) Clock the shift register > 4) Set the data input low > 5) Clock the shift register 7 times > goto Loop; > > The method of using one pin would be implemented by feeding the > microcontroller pin into a 3-Bit binary counter which feeds into a 3- > to-8 decoder. > > I've been warned against using the one-pin method, people telling me > that I could lose sync if "a bit of static" or "a bit of noise" gets > in. > > For my own project board, I went with the one-pin method. I left the > board on overnight for three nights in a row and I never lost sync > (don't ask me how many million times the display flashed). The only > way it ever loses sync is if I terminate the connection to the piezo > speaker while the piezo speaker is on (this has the effect of clocking > the shift register). > > So I've two questions: > > 1) Should we worry about "noise" and "static", or should we rely on > the chips doing their job perfectly? Also, does interference only > occur on the chip's external pins, or can it occur within the chip > itself? If it can occur within the chip then it would seem that > microcontrollers are a lost cause... I mean what's the point in > writing a program if you can't rely on the microcontroller to execute > it reliably? > > 2) What do you think could be causing the shift register to clock when > I terminate the connection to the piezo? If I turn the piezo on and > off in software then I don't have the same problem, it only occurs if > I physically sever the connection, and it only happens when the piezo > is on. Someone suggested putting a capacitor in parallel with the > piezo but I'd like to understand what this would do. You can still use the one pin method and have "zap proof" recovery. You can shift out enough zero data to ensure that all LEDs have been cleared and then shift out your desired pattern. You control the 1's.
From: Walter Banks on 6 May 2008 18:25 Tom�s � h�ilidhe wrote: > A lot of you are familiar with the method of using a shift register to > multiplex a matrix of LED's. > > My college project this year was to make a Connect4 game consisting of > a 7x6 matrix of LED's. > > I had two choices for implementing the display: > 1) Use two pins from the microcontroller > 2) Use one pin from the microcontroller > > The method of using one pin would be implemented by feeding the > microcontroller pin into a 3-Bit binary counter which feeds into a 3- > to-8 decoder. > > I've been warned against using the one-pin method, people telling me > that I could lose sync if "a bit of static" or "a bit of noise" gets > in. > > For my own project board, I went with the one-pin method. I left the > board on overnight for three nights in a row and I never lost sync > (don't ask me how many million times the display flashed). The only > way it ever loses sync is if I terminate the connection to the piezo > speaker while the piezo speaker is on (this has the effect of clocking > the shift register). > > So I've two questions: > > 1) Should we worry about "noise" and "static", or should we rely on > the chips doing their job perfectly? Also, does interference only > occur on the chip's external pins, or can it occur within the chip > itself? If it can occur within the chip then it would seem that > microcontrollers are a lost cause... I mean what's the point in > writing a program if you can't rely on the microcontroller to execute > it reliably? > > 2) What do you think could be causing the shift register to clock when > I terminate the connection to the piezo? If I turn the piezo on and > off in software then I don't have the same problem, it only occurs if > I physically sever the connection, and it only happens when the piezo > is on. Someone suggested putting a capacitor in parallel with the > piezo but I'd like to understand what this would do. This is the hardware equivalent of the two copy problem. Open sync is a bad design idea. Assume in your design that it will fail to sync at some point and have a way to resync as part of the design even using a second micro to drive the display or choose a micro suitable for the task. Micro's cost is very similar to small shift or decoders. w..
|
Next
|
Last
Pages: 1 2 Prev: Ethernet in its most basic form Next: WHOLESALE,FENDI,DIOR,BURBERRY,ARMANI,GUCCI,LV,D&G,DIOR SUNGLASSES |