I couldn't see any posts about a propellor clock, I was suprised.
I am trying to work out whether my idea here is too amitious to ever work.
I am considering using a PIC18F4* processor as a controller for a propellor clock, running with a 48MHz oscillator.
The clock would be two arms (dipole), with 8 RGB LEDs on each arm, slightly offset, so after a half revolution, the other 8 LEDs would fit between the first half (i.e. interlaced)
So:
Arm A: Pivot O Arm B:
A0 - A1 - A2 - A3 - A4 - A5 - A6 - A7 - O B7 - B6 - B5 - B4 - B3 - B2 - B1 - B0 -
Which would become:
A0 B0 A1 B1 A2 B2 A3 B3 A4 B4 A5 B5 A6 B6 A7 B7 O (mirror)
This I think would help with the placement.
The LEDs I am looking at are common Cathode RGB, so I would have to bring each Anode high in order to make a light.
I was thinking that I could use an 74HC374N for this. Not used one before, but as I understand it, you can apply a ground or voltage to the 'data' pins, set the Output Enable to ground, and strobe the clock signal, and it should latch (flip-flop) the outputs and keep them stable.
So my thought is, I attach 3 of these to port B, and 3 to port D of the 18f4* PIC (ports B and D are full 8 bit ports, but, don't do anything that 'special' [I am considering a wireless uart attached to C6/C7, if everything works out well] and ports A and E are only 5 / 3 bits).
I attach the output enable to each of these 74HC chips to ground, and then the following would happen:
while(1){
determine_position(); // based upon how many cycles have passed since last position counter.
portB=<bitmask-R>;
portD=<bitmask-R>;
strobe_clock_R(); //port E0 up, then down, should lock in portB and portD into the relevant 74HCs
portB=<bitmask-B>;
portD=<bitmask-B>;
strobe_clock_B(); //port E1 up, then down, should lock in port B and D into the relevant 74HCs, the others should ignore this?
portB=<bitmask-G>;
portD=<bitmask-G>;
strobe_clock_G(); //port E2 up, then down, should lock in port B and D
Is this going to work? Am I being too ambitious would the system move on too much before it manages to lock in all 3 colours?
Have I completely misunderstood how these flip-flops should work?
I have attached a schematic, ish, I stopped drawing because it was getting too busy, I think there is enough to get the idea though.
I am trying to work out whether my idea here is too amitious to ever work.
I am considering using a PIC18F4* processor as a controller for a propellor clock, running with a 48MHz oscillator.
The clock would be two arms (dipole), with 8 RGB LEDs on each arm, slightly offset, so after a half revolution, the other 8 LEDs would fit between the first half (i.e. interlaced)
So:
Arm A: Pivot O Arm B:
A0 - A1 - A2 - A3 - A4 - A5 - A6 - A7 - O B7 - B6 - B5 - B4 - B3 - B2 - B1 - B0 -
Which would become:
A0 B0 A1 B1 A2 B2 A3 B3 A4 B4 A5 B5 A6 B6 A7 B7 O (mirror)
This I think would help with the placement.
The LEDs I am looking at are common Cathode RGB, so I would have to bring each Anode high in order to make a light.
I was thinking that I could use an 74HC374N for this. Not used one before, but as I understand it, you can apply a ground or voltage to the 'data' pins, set the Output Enable to ground, and strobe the clock signal, and it should latch (flip-flop) the outputs and keep them stable.
So my thought is, I attach 3 of these to port B, and 3 to port D of the 18f4* PIC (ports B and D are full 8 bit ports, but, don't do anything that 'special' [I am considering a wireless uart attached to C6/C7, if everything works out well] and ports A and E are only 5 / 3 bits).
I attach the output enable to each of these 74HC chips to ground, and then the following would happen:
while(1){
determine_position(); // based upon how many cycles have passed since last position counter.
portB=<bitmask-R>;
portD=<bitmask-R>;
strobe_clock_R(); //port E0 up, then down, should lock in portB and portD into the relevant 74HCs
portB=<bitmask-B>;
portD=<bitmask-B>;
strobe_clock_B(); //port E1 up, then down, should lock in port B and D into the relevant 74HCs, the others should ignore this?
portB=<bitmask-G>;
portD=<bitmask-G>;
strobe_clock_G(); //port E2 up, then down, should lock in port B and D
Is this going to work? Am I being too ambitious would the system move on too much before it manages to lock in all 3 colours?
Have I completely misunderstood how these flip-flops should work?
I have attached a schematic, ish, I stopped drawing because it was getting too busy, I think there is enough to get the idea though.
Attachments
-
58.9 KB Views: 36