n1ist wrote:Do you want to use a different pin for driving RCK? If you use the on-chip SPI peripheral (that will let you write the shift registers with two instructions, rather than bit-banging it), MISO gets set as an input, and can't be overridden (at least that's how it is on the ATMegas...)
The Attiny2313 doesn't have a true SPI interface (it's more like SPI emulation using the USI) so some bit-banging is necessary no matter what pins are used, which of course eats up clock cycles.
Pin PB4 is the SS (Slave Select) on the Attiny2313, which I used to drive the RCK line.
RPM wrote:The Attiny2313 doesn't have a true SPI interface (it's more like SPI emulation using the USI) so some bit-banging is necessary no matter what pins are used, which of course eats up clock cycles.
Pin PB4 is the SS (Slave Select) on the Attiny2313, which I used to drive the RCK line.
The USI has the same general limitations - in three wire mode (aka SPI) it will force the MISO and MOSI pins to behave appropriately for SPI. That's why I haven't tried to change my I2C project to an SPI variant that doesn't use MISO on the slave end. Doesn't matter in your case since you're not using MISO/MOSI.
As to Tiny2313 availability, it looks like we're in a transition phase where the 2313 is going obsolete and the 2313A hasn't ramped up in production yet.
I don't know about SPI mode, but in I2C mode the USI is reasonably efficient, not too much bitbanging is needed. The I2C slave code I used in my project fires an interrupt when the USI overflows (every byte, a USART or hardware SPI would do the same) and on the start condition detection. SPI shouldn't be too much worse.
Just an update: I have the current circuit on a bb but am having difficulty making it work. Matt E and I are messaging back and forth and I'm sure we'll get it sorted out shortly.
Part of the problem is that my job -- the thing that brings in the $$ for the toys -- has heated up in the last few days and will be intruding for the next couple of weeks. So I may not be able to work on the circuit as much as I'd like. I'll get to it here and there and will keep you all abreast.
Nonetheless, we are making progress.
Thanks for keeping tabs on us.
\dmc
Further update: Still struggling with getting the schematic translated to a working breadboard. I've had only limited time in the last week or so to devote to this project, so that's certainly been part of it.
Back at you when I know more.
\dmc
OK My Prototype is on the way now too. So far I can accept DMX, program the Channel and LEDs work as per RPM's instructions.
Rev 3 of the Schematic is attached. It harmonises closer to the original concept and fixes a couple of stupid mistakes Like the LEDs being driven low instead of the high.
Cheers
Matt
Looks good. Glad to see decoupling capacitors. So many people underestimate the importance of them.
These days I often add in a polyswitch and crowbar diode for reverse polarity protection. Cheap to add and helps when you have a "Doh" moment!
The only other comment is that I would have implemented the RS485 Tx and TxEn seeing you had the pins spare on the micro. It costs nothing to do in hardware and open up the possibility of a reverse comms path for some future project.
Ops.
I was putting the 595s and 2803 on the proto-board and fund a schematic error. (Tiny2313s don't implement the SPI properly.)
Rev 4 Attached
Note the Resistor values for R5, R7, R9, R11, R13, R15, R17 and R19 are chosen to 15mmA (not 22 like the original design).
Update: I have had problems transferring the schematic to a breadboard and have been banging my head against the wall for the last couple of weeks.
I think I figured out the problem just a few minutes ago; it requires a delivery from Mouser to see if I'm right.
Matt does have the circuit working, though I believe he hasn't built an 8*8 array; RPM is providing superior moral support.
This problem will get whipped.
\dmc
I can't tell a diode from a lawnmower but did you try removing the bread from the board first?
OK! I am bored. It has been freezing out here for too long. What part of the garden not still snow covered is a mess of sticky wet red clay and now we are getting freezing rain.
BTW, I do have very long grass.
theoldgeezer wrote:I can't tell a diode from a lawnmower but did you try removing the bread from the board first?
OK! I am bored. It has been freezing out here for too long. What part of the garden not still snow covered is a mess of sticky wet red clay and now we are getting freezing rain.
BTW, I do have very long grass.
LOL...
C'mon up here to Minnesnowda -- and you kin ferget about your grass... two of my 4-foot tall mini-trees are now covered by snow.. I won't get this stuff out of the yard until July! And the snow just keep comin' and comin' and comin'...:rolleyes:
