Hi again Darrel,
All that stuff worked a treat. Thanks.
Now there is a follow up to that series.
Now that I am getting 5 bytes to play with, I am simply generating a 4 digit decimal code by taking the last numeral from each of the bytes (decimalised) ((along the lines of dec1 card(1) dec1 card(2) dec1 card(3) dec1 card(4)))
This works fine, as long as I am sending these numerals out serially or sending to an LCD. What I am having trouble with is sending the bottom half of the decimal byte to a port. The byte should be %0000xxxx where xxxx is the decimal 0 - 9 in binary. Right so far??
It seems to me that I can't qualify the byte as dec1, BIN4 or anything like that when I am not sending it to the port. I have tried portb = var AND %00001111 which to my way of thinking should mask off the top nibble but what I get out of the port is a full byte of 1's with no resemblance to the numeral that can be deciphered at all.
I got a few other things to try, so I'll be back.
I'll have a look at BCD and see if I can make that work.
Bookmarks