2011_ACTIVITY #3 - DISPLAYING DIGITS

2011_ACTIVITY #3 - DISPLAYING DIGITS - 2 PAUSE 1000 OUTH =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
' What's a Microcontroller - DisplayDigits.bs2 ' Display the digits 0 through 9 on a 7-segment LED display. ' '{$STAMP BS2} '{$PBASIC 2.5} ' DEBUG "Program Running!" D OUTH = %00000000 ' OUTH initialized to low. DIRH = %11111111 ' Set P8-P15 to all output-low. ' Digit: ' BAFG.CDE OUTH = %11100111 ' 0 PAUSE 1000 OUTH = %10000100 ' 1 PAUSE 1000 OUTH = %11010011
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ' 2 PAUSE 1000 OUTH = %11010110 ' 3 PAUSE 1000 OUTH = %10110100 ' 4 PAUSE 1000 OUTH = %01110110 ' 5 PAUSE 1000 OUTH = %01110111 ' 6 PAUSE 1000 OUTH = %11000100 ' 7 PAUSE 1000 OUTH = %11110111 ' 8 PAUSE 1000 OUTH = %11110110 ' 9 PAUSE 1000 P DIRH = %00000000 ' I/O pins to input, ' segments off. END...
View Full Document

This note was uploaded on 01/10/2011 for the course EE 1244 taught by Professor Drera during the Fall '10 term at Conestoga.

Ask a homework question - tutors are online