fernandodiaz
Junior Member

Offline
Posts: 73
Thank You
-Given: 1
-Receive: 18
|
 |
« Reply #5 on: November 10, 2007, 10:00:52 22:00 » |
|
Include "PROTON_4.INC" Dim W0 as Word ' Address Dim B1 as byte dim B2 as byte ' Data 1 dim B3 as byte dim B4 AS BYTE DIM B5 AS BYTE DIM B6 AS BYTE DIM B7 AS BYTE dim temp as byte ' ' for read loop: print at 1,1," " print at 2,1," " CONVIERTEIN: ' DEC A HEX TEM = ((TEM >> 4) * 10)+ TEM & $0F) 'DEC A HEX PARA GUARDAR AL CHIP Return ' Data 2 BUSIN 208,0,[b1] ' seg poner temp por b1 BUSIN 208,1,[b2] ' min BUSIN 208,2,[b3] ' hrs
BUSIN 208,4,[b5] ' dia BUSIN 208,5,[b6] ' mes BUSIN 208,6,[b7] ' año
' BUSIN $D1,0,[SEC] ' seconds, if yo read this address the RTC stop the count.
Print at 1,1,hex b3 ,":",hex b2,":",hex b1 Print at 2,1,hex b5 ,":",hex b6 ,":",hex B7 Delayms 500 '___________________________________________________________________________________________- 'for write if portb.0 = 1 then temp = 10 temp = ((temp / 10) << 4) + (temp // 10) : busout 208,4,[temp] ' conv decial a hex temp = 10 temp = ((temp / 10) << 4) + (temp // 10) : busout 208,5,[temp] ' conv decial a hex temp = 10 temp = ((temp / 10) << 4) + (temp // 10) : busout 208,6,[temp] ' conv decial a hex endif
Goto loop
' suerte
|