Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/15/07 14:30
Read: times


 
#135048 - help with 8051 byte manipulation for Binary CLock
Hi all,
I'm new to 8051 and in fact It's only been 2 weeks :P
So the first project I'm trying to do is a simple Binary Clock.
I managed to create one and run it through software simulator.
However, the binary clock that already working is some almost true binary clock, where it has one byte for each Hour, minutes and seconds.
On current version, I already has 3 variables that hold the value of Hour minutes and seconds.
The display is straight forward, driving the whole P0, P1 and P3 for each display.

Now what I'm trying to do is to make it easier to read, a clock with indicator for every tenth for each output.
For example, when the second led already reaches 10, it will lit up a led on different column to mark 10 seconds.

The problem is, I can't figure out a way to control the P0 the simplest way.
Driving the whole P0 as one is easier, but now, P0 is divided into two different function.

P0.0 , P0.1, P0.2 and P0.3 will mark 1, 2, 4, 8 seconds and P0.4, P0.5 and P0.6 will mark 10, 20 and 40 respectively.


What I can think of now is to do conditional jumping for each possible seconds and drive each Port individually and it would make the size huge.

I tried to figure out the geek clock based on PIC. And the author seems to do AND logic to drive the leds, but I couldn't figure it out.

So please make a suggestion.

THanks in advance !


List of 4 messages in thread
TopicAuthorDate
help with 8051 byte manipulation for Binary CLock            01/01/70 00:00      
   BCD            01/01/70 00:00      
   Thanks !!!            01/01/70 00:00      
      keep a cheatsheet around            01/01/70 00:00      

Back to Subject List