Adam Yarrow
New Member
Hi people, first of all Id like to thank everyone for reading this and if you can help that's even better!
I am new to assembly and I am a little stuck on a project
firstly I want to take a table (as below)
and convert each digit in sequence to BCD to display on a LED bank located at PORTB using the below lookup table
so far I have managed to get the contents of table2 to display on PORTB in sequence but am a little stuck as to how to take the first value from table1, convert it to the bcd value in table2 then display it on PORTB
any help would be great, even pointing me to a tutorial, or information would be great as I have no idea where to start
Thanks in advance
I am new to assembly and I am a little stuck on a project
firstly I want to take a table (as below)
Code:
table1 PCL,F
dt "1234567890"
Code:
table2 PCL,F
retlw b'11000' ;BCD for decimal 0
retlw b'00011' ;BCD for decimal 1
retlw b'00101' ;BCD for decimal 2
retlw b'00110' ;BCD for decimal 3
retlw b'01001' ;BCD for decimal 4
retlw b'01010' ;BCD for decimal 5
retlw b'01100' ;BCD for decimal 6
retlw b'10001' ;BCD for decimal 7
retlw b'10010' ;BCD for decimal 8
retlw b'10100' ;BCD for decimal 9
any help would be great, even pointing me to a tutorial, or information would be great as I have no idea where to start
Thanks in advance