I have a DS-1302 RTC module but how to use it?
I recall Jon Chandler made a vu meter clock but what he used for timing?
Am planning on a clock that has no hands, just LEDs but precision would be nice.
I have a DS-1302 RTC module but how to use it? I recall Jon Chandler made a vu meter clock but what he used for timing? Am planning on a clock that has no hands, just LEDs but precision would be nice.
if your connections are anything like they were a few posts ago, try this:
Code:
Device = 18F43K22
Clock = 8
// int osc and IO pin libraries
Include "intosc.bas"
#option DIGITALIO_INIT = true // automatically call setalldigital
Include "setdigitalio.bas"
Include "SHIFT.BAS"
Dim LATCH As PORTB.4 // hc595 pin 12 LCHCLK
Dim DATA As PORTA.1 // hc595 pin 14 SDI
Dim CLK As PORTB.3 // hc595 pin 11 SFTCLK
Dim RST As PORTB.1 // hc595 pin 10 RSTn (no connection to pcb)
Dim SDO As PORTA.4 // hc595 pin 9 SDO QH' shift out
Dim Leds As Byte
// set pin modes
Shift.SetClock(CLK)
Shift.SetOutput(DATA)
Shift.SetInput(SDO)
high(RST)
low(LATCH)
// if there was a connection...
low(RST)
delayus(100)
high(RST)
// cycle leds
leds = 0
while (true)
if (leds = 0) then
leds = 1
endif
Shift.Out(MSB_FIRST, leds, 8)
LATCH = 1
LATCH = 0
delayms(250)
leds = leds << 1
end while
It corrects a few issues with the code I posted previously
Trying to troubleshoot a clocked logic circuit is like running the Boston marathon in snowshoes.
U2 Pin is an output and does not ned to be connected to anything unless you're using the signal that will be there. It's OK to connect it to your uC, but that pin must be set as an input so it doesn't fight the U2 pin 9 state.
Today I am rechecking ALL my connections and tying the RST pin 10 to HIGH.
Hopefully get this project back on track.
Using the schematic in post#346. but connecting pin 10 of the 74hc595 to Vcc
BIG QUESTION? how does leds rotating around make for a clock? that's what the video is showing in post 356.
While waiting for parts to assemble a shift register board with 10 -74hc595s I decided to maybe redesign my HAWK CLOCK but looking over the thread I am skeptical about how to tell time.
THAT video was just a test pattern ... here is another video from 12:59pm to 1:00am. The minutes are on the outer ring with the seconds and use a SINGLE led, while the hours are on the inner ring and use TWO led's with a gap in the middle. This way they can traverse over the 12, 3, 6, and 9 hour ticks and you can still see where they are on the display.