AVR simulator problem

Status
Not open for further replies.

magnatro

New Member
i programmed the simulator for reading an input port of atmega 8 and then tensmit it over a distance by using 648 L encoder.. but i cant read the value, tried DDRx , Config, but of no use. if you have, can you post a basic code (or asm) that assigns a port as input. or suggest another compiler? (basic) ?
regards
Magnatro
 
In order to set a port as input DDRx has to be set to 0, PORTx has to be set to 0, and you read the PINx register. If any bit on PORTx is set to 1 while the corresponding DDRx bit is 0 the internal pullup on that I/O line will be enabled.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…