Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: convert port to binary number

2004-09-28 by upand_at_them

Huh?  Each port IS a binary number.  Just read the port.

Mike


--- In AVR-Chat@yahoogroups.com, "jim_rinaudo" <jravionics@w...> 
wrote:
> 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

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.