treadmill program

treadmill program - movx @DPTR,A mov DPTR,#h'8007 mov...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Stacy Devino Lab 2b EECS 346 start RTC + P1 (port_1) mov p1,#h'00 mov R0, #h'ff loopit: mov R1, #h'ff loopnow: nop nop djnz R1,loopit djnz R0,loopnow Set registers mov DPTR, #h'800A Register A mov A,#d'0032 movx @DPTR,A mov DPTR, #h'800B Register B mov A,#d'0128 movx @DPTR,A mov DPTR,#h'8000 seconds mov A,#h'00 movx @DPTR,A mov DPTR,#h'8001 mov A,#h'00 movx @DPTR,A mov DPTR,#h'8002 minutes mov A,#h'00 movx @DPTR,A mov DPTR,#h'8003 mov A,#h'00 movx @DPTR,A mov DPTR,#h'8004 hours mov A,#h'00 movx @DPTR,A mov DPTR,#h'8005 mov A,#h'00 movx @DPTR,A mov DPTR,#h'8006 mov A,#h'01
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: movx @DPTR,A mov DPTR,#h'8007 mov A,#h'01 movx @DPTR,A mov DPTR,#h'8008 Sheet1 Page 2 mov A,#h'01 movx @DPTR,A mov DPTR,#h'8009 mov A,#h'01 movx @DPTR,A Reset B mov DPTR, #h'800B mov A,#h'00 movx @DPTR,A rxd_pin: JB p3.0, Hours clr p3.0 Seconds: mov DPTR,#h'8000 movx A, @DPTR mov p1, A setb p3.4 clr p3.4 mov DPTR,#h'8002 movx A, @DPTR mov p1, A setb p3.5 clr p3.5 jmp Seconds Hours: mov DPTR,#h'8002 movx A, @DPTR mov p1, A setb p3.4 clr p3.4 mov DPTR,#h'8004 movx A, @DPTR mov p1, A setb p3.5 clr p3.5 jmp Hours...
View Full Document

Page1 / 2

treadmill program - movx @DPTR,A mov DPTR,#h'8007 mov...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online