I don't know of any specific commands because each port is stored as a binary number so there really is no need to convert it. So if you use two ports you will have a low byte and a high byte, one will be port a and the other port b. Ie: Mov R20, PINA Mov R21, PINB Daniel > -----Original Message----- > From: jim_rinaudo [mailto:jravionics@webworkz.com] > Sent: Monday, September 27, 2004 10:05 PM > To: AVR-Chat@yahoogroups.com > Subject: [AVR-Chat] convert port to binary number > > > OK, I surrender. I tried all the searches I can think of and I need > to find the command that takes all the input states of a port and > makes it a single binary number. I looked in my codevision help > section and no help there either. > > The input is 12 bits arranged in groups of three so I plan on using 6 > inputs in port a and 6 in port b and convert each six into one big 12 > bit number. then I use the 12 bit number to compare to a value in > an array and output an equivalent decimal. > > Can anyone give me a clue. > > thanks > > Jim
Message
RE: [AVR-Chat] convert port to binary number
2004-09-28 by Daniel Boyer
Attachments
- No local attachments were found for this message.