Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

New Articles From Microcontroller Tips

Back
Top