# Seconds Counter for Binary Clock

785

4

3

## Introduction: Seconds Counter for Binary Clock

; the idea ;
32+16+8+4 = 60 sec
or
111100

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: At Beginning :

السلام عليكم
first of All sorry for my poor English :|
in this instructable I'll show you How to make "binary clock" beginning from seconds counter to minute and Hour in final

## Step 2: Why Bascom Avr ?

I used bascom language to programming -ATMIGA8L-
_MCU_
,it was a High level language
with a clearly and easy directives
so , the " bascomian programers"
:-D would know this /5/ standard principles in programing :
1- Directives (the mcu, crystal..
3- variables (x,y...
4- main program
5- subroutines
and you there should follow this sentences at any program
you write it

## Step 3: Schematic :

we need
'6 leds (3mm)
'6 resistors ( 200 ohm ...)
'1 microcontroller (in my case atmega8l)
connect each components like the picture

## Step 4: On Test Board :

after we connected the components
it's well be like the first picture
we connect the leds directly to controller because they deserve just 10 mA from 1 pin
and from all pins 60 mA
and my controller can resist this value (it can resist up to 300 mA)
optionally component ;
- I added sponge cap from (old watch box) I have cut it from centre to fitting the leds ( it's black to absorb the light and to see the clock clearly )

## Step 5: The Program :

*Directives :
\$regfile ="m8def.dat"
\$crystal = 1000000
*configuration :
config portc =&B00111111
*variable :
portc =&B00000000
*maim program :
Do
While portc=&B00111100
Incr portc
wait 1
Wend
portc =&B00000000
loop
End
............................................

## Step 6: The End

in the result we had got
seconds counter
picture 1 : 0
and after one second
picture 2 : 1
..picture 3 : 2
picture 4 : 3
5. : 4
and
59
60

## Step 7: Pray for Peace in My Country

Syria , Damascus
older city in the world
:-)

84 15K
296 24K
231 14K

## 3 Discussions

This looks great! I love binary clocks. I actually have one similar to the watch displayed in your instructable.