Re: [neonixie-l] Re: Looking for advice on shift registers

2012-04-05 Thread Julien Noël
Hi paul,

 Ogi lumen nixie kit (google it) is based exactly the same components you re 
going to use.

They also provide schema and an arduino library to drive it.

I used that library as example to build my clock based on shift register

-- 
Julien Noël

On 4 avr. 2012, at 23:40, Paul  wrote:

> Try this Arduino web site  http://arduino.cc/en/Tutorial/ShiftOut
> It gives several examples of using this chip with code.
> 
> On Mar 31, 4:28 pm, Dylan Distasio  wrote:
>> Hi all-
>> 
>> I've been circling back to the nixie clock project I am working on that
>> starts with a base kit of 6 IN-14s each with their own module that contains
>> a PCB with a 74141 on it.  I have never used shift registers before, but
>> finally got around to some initial experiments driving one 74HC595 with an
>> Arduino connected to one set of 74141 inputs (ABCD) to keep things simple.
>>  I was able to get the different digits lit up based on my code, but am
>> wondering if I am missing something in terms of ease of use here.
>> 
>> I will need three 74HC595s if I go this route (6xABCD, 8 registers per 595
>> IC).  The techniques I had come across on the Arduino consisted of serially
>> feed bits to the 595 until all 8 registers per chip were full.  It would
>> seem like I need to send 24 bits each second as the clock ticks.  The fact
>> that I have to do this serially one bit at a time seems like a pain in the
>> neck.  Am I missing something (I'm sure I probably am) in terms of being
>> able to set all 24 in parallel?
>> 
>> I'm hoping someone with more experience using arduinos and shift registers
>> could provide some insights / tips.  I'm also open to hearing about how to
>> use these from a uC agnostic perspective if noone on list is doing this
>> with arduinos, but some code snippets would be ideal from the arduino
>> perspective.
>> 
>> Thanks,
>> Dylan
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "neonixie-l" group.
> To post to this group, send an email to neonixie-l@googlegroups.com.
> To unsubscribe from this group, send email to 
> neonixie-l+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/neonixie-l?hl=en-GB.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To post to this group, send an email to neonixie-l@googlegroups.com.
To unsubscribe from this group, send email to 
neonixie-l+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/neonixie-l?hl=en-GB.



[neonixie-l] Re: Looking for advice on shift registers

2012-04-04 Thread Paul
Try this Arduino web site  http://arduino.cc/en/Tutorial/ShiftOut
It gives several examples of using this chip with code.

On Mar 31, 4:28 pm, Dylan Distasio  wrote:
> Hi all-
>
> I've been circling back to the nixie clock project I am working on that
> starts with a base kit of 6 IN-14s each with their own module that contains
> a PCB with a 74141 on it.  I have never used shift registers before, but
> finally got around to some initial experiments driving one 74HC595 with an
> Arduino connected to one set of 74141 inputs (ABCD) to keep things simple.
>  I was able to get the different digits lit up based on my code, but am
> wondering if I am missing something in terms of ease of use here.
>
> I will need three 74HC595s if I go this route (6xABCD, 8 registers per 595
> IC).  The techniques I had come across on the Arduino consisted of serially
> feed bits to the 595 until all 8 registers per chip were full.  It would
> seem like I need to send 24 bits each second as the clock ticks.  The fact
> that I have to do this serially one bit at a time seems like a pain in the
> neck.  Am I missing something (I'm sure I probably am) in terms of being
> able to set all 24 in parallel?
>
> I'm hoping someone with more experience using arduinos and shift registers
> could provide some insights / tips.  I'm also open to hearing about how to
> use these from a uC agnostic perspective if noone on list is doing this
> with arduinos, but some code snippets would be ideal from the arduino
> perspective.
>
> Thanks,
> Dylan

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To post to this group, send an email to neonixie-l@googlegroups.com.
To unsubscribe from this group, send email to 
neonixie-l+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/neonixie-l?hl=en-GB.



[neonixie-l] Re: Looking for advice on shift registers

2012-04-01 Thread coggs
You can check out the source code and schematics to my nixie driver
board which utilizes the atmega 328 hardware spi - schematics here:
http://cogwheelcircuitworks.com/downloads/ source code here:
https://github.com/cogwheelcircuitworks/Cogwheel-Nixie-System
..c

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To post to this group, send an email to neonixie-l@googlegroups.com.
To unsubscribe from this group, send email to 
neonixie-l+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/neonixie-l?hl=en-GB.



[neonixie-l] Re: Looking for advice on shift registers

2012-04-01 Thread Jon


On Mar 31, 11:28 pm, Dylan Distasio  wrote:
> The fact
> that I have to do this serially one bit at a time seems like a pain in the
> neck.  Am I missing something (I'm sure I probably am) in terms of being
> able to set all 24 in parallel?


Dylan,

Nope, it's a serial shift register, so you do need send the data out
one bit at a time.

But it's totally not a problem on either the code or timing front. I'm
assuming you've got the 595s wired in a daisy chain, with the data
input of the first register wired to an IO bit on the microcontroller,
the data out of that 595 wired to the data input of the next etc.
Connect all the 595 clock pins together to a pin on your arduino,
ditto with the latch and output enable lines (if you're using the
latter).

The 595 will take the data essentially as fast as you can throw it out
(unless you're using a really exotic controller). There are a zillion
ways to code this, depending on whether you want speed, compact code,
want to use hardware assistance as David suggests elsewhere in the
thread. But honestly, there's no need to get flowery here - a simple
bit bang works perfectly in this setting. Here's a platform-
independent code snippet in C which is cut'n'pasted from the code for
my 42 tube clock (http://youtu.be/4FnxWsp58EM)


/*
** Function to write a byte to the shift register chain as fast as
needed.
** The argument is a byte of data which is simply inspected one bit at
a time,
** used to set the DATA line and then a fast clock pulse formed. No
manipulations
** are made of the latch or output enable lines - it is for the caller
** to ensure that these are managed appropriately. There are no
returns. It takes
** about 4us to blast out the whole byte.
**
** Usage:   write_SR(value);
**
**  void write_SR();
**  byte value;
*/

void write_SR(byte value)

{
if (value & 0x80)
   DATA = 1;
else DATA = 0;
CLOCK = 1;
CLOCK = 0;
if (value & 0x40)
DATA = 1;
else DATA = 0;
CLOCK = 1;
CLOCK = 0;
if (value & 0x20)
DATA = 1;
else DATA = 0;
CLOCK = 1;
CLOCK = 0;
if (value & 0x10)
DATA = 1;
else DATA = 0;
CLOCK = 1;
CLOCK = 0;
if (value & 0x08)
DATA = 1;
else DATA = 0;
CLOCK = 1;
CLOCK = 0;
if (value & 0x04)
DATA = 1;
else DATA = 0;
CLOCK = 1;
CLOCK = 0;
if (value & 0x02)
DATA = 1;
else DATA = 0;
CLOCK = 1;
CLOCK = 0;
if (value & 0x01)
DATA = 1;
else DATA = 0;
CLOCK = 1;
CLOCK = 0;
}


You might ask why I don't have a loop as the code is so repetetive.
The answer is speed - I deliberately unrolled the loop because I have
a 160 bit shift register chain to manage for a multiplexed display
with cross-fades and some other quite complex display animations too.
Note that even for such a long shift register chain, there's no need
to worry about display glitching if you use the LATCH line. Just clock
all the bits through at your leisure and then pulse the LATCH line
once to update the output in one go.

Hope this helps some.

Jon.

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To post to this group, send an email to neonixie-l@googlegroups.com.
To unsubscribe from this group, send email to 
neonixie-l+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/neonixie-l?hl=en-GB.



[neonixie-l] Re: Looking for advice on shift registers

2012-03-31 Thread Cobra007
I never used an Arduino before but this seems like all you need to
know about the SPI:

http://arduino.cc/en/Reference/SPI

The bit-bang method is still interesting to try things out as you get
to fully understand what will happen once you start using the SPI.

Michel



On Apr 1, 11:10 am, Dylan Distasio  wrote:
> Thanks for the comments on the SPI, David and Adam.  I'll look into that
> approach.  I'm excited to pick up some new skills/tricks!
>
>
>
>
>
>
>
> On Sat, Mar 31, 2012 at 9:02 PM, Adam Jacobs  wrote:
> > Yep, if you're trying to bit-bang the SPI then you are definitely
> > re-inventing the wheel. Look at Arduino "sketches" for other SPI devices
> > and see how they do it there. I don't have any arduino experience so I
> > can't be of much help either, but I've used the SPI port on the AVR many
> > many many times and it's a breeze.
>
> > -Adam
>
> > On Sat, Mar 31, 2012 at 4:48 PM, David Forbes wrote:
>
> >> On 3/31/12 3:28 PM, Dylan Distasio wrote:
>
> >>> Hi all-
>
> >>> I've been circling back to the nixie clock project I am working on that
> >>> starts with a base kit of 6 IN-14s each with their own module that
> >>> contains a PCB with a 74141 on it.  I have never used shift registers
> >>> before, but finally got around to some initial experiments driving one
> >>> 74HC595 with an Arduino connected to one set of 74141 inputs (ABCD) to
> >>> keep things simple.  I was able to get the different digits lit up based
> >>> on my code, but am wondering if I am missing something in terms of ease
> >>> of use here.
>
> >>> Thanks,
> >>> Dylan
>
> >> Dylan,
>
> >> A clever programmer will figure out how to use the Arduino's SPI port
> >> with the 74HC595s to eliminate all the software work of banging out the
> >> bits. I've never used an Arduino, so I don't know how it's done. I've used
> >> this chip with the PIC SPI port, and it works.
>
> >> --
> >> David Forbes, Tucson AZ
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "neonixie-l" group.
> >> To post to this group, send an email to neonixie-l@googlegroups.com.
> >> To unsubscribe from this group, send email to neonixie-l+unsubscribe@**
> >> googlegroups.com .
> >> For more options, visit this group athttp://groups.google.com/**
> >> group/neonixie-l?hl=en-GB
> >> .
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "neonixie-l" group.
> > To post to this group, send an email to neonixie-l@googlegroups.com.
> > To unsubscribe from this group, send email to
> > neonixie-l+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/neonixie-l?hl=en-GB.

-- 
You received this message because you are subscribed to the Google Groups 
"neonixie-l" group.
To post to this group, send an email to neonixie-l@googlegroups.com.
To unsubscribe from this group, send email to 
neonixie-l+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/neonixie-l?hl=en-GB.