Posted: Fri Aug 20, 2004 6:59 am Post subject: port bin set and reset or cbi sbi in asm without config port
I am using the portd.0 for data input (Hardware rx input)
so can I using the portd (EXCEPT PORTD.0 pin ) for controlling relay or other devices with the set and reset command or asembler sbi,cbi commant without config portd = outbut
If I am use the config portd = output
I am not using the data input for
portd.0 is right ?
Joined: 14 Jul 2004 Posts: 138 Location: Australia
Posted: Fri Aug 20, 2004 2:45 pm Post subject: Re: port bin set and reset or cbi sbi in asm without config
ekrem hacibektasoglu wrote:
If I am use the config portd = output
I am not using the data input for portd.0 is right ?
Yes you are right.
you can set individual inputs or outputs as described, or in asm
Code:
sbi ddrd, 1'set bit in i/o (output) data direction register port d.1
cbi ddrd, 0' clear bit in i/o (input)....portd.0 or in one hit
ldi r16, &B01111111
outddrd, r16
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum