Do you have a question? Post it now! No Registration Necessary
April 21, 2006, 3:55 am

I would like to input 10 bit from port B pin 0, 1, 2, 3 and output it to
port D pin 2, 3, 4, 5, however, my code seem doesn't work. Could you guy
please give me some idea and point out the mistake.
Bascom AVR complier, Atmel AT90S8535.
The code is shown as below
$regfile = "8535DEF.dat"
$crystal = 8000000
Config Portb = Input
Config Portd = Output
Dim R As Word , W As Byte
Do
Ddrb = &B11110000 'set pin 0,1,2,3
as input
R = Portb
Ddrd = &B00111100 'set pin 2,3,4,5
as input
Portd = R
Loop
End
Site Timeline
- » Simple BASIC microcontroller programming question
- — Next thread in » Electronics Down Under
-
- » Sharp microwave display
- — Previous thread in » Electronics Down Under
-
- » Jaycar.
- — Newest thread in » Electronics Down Under
-
- » Obudowy z JLCPCB
- — The site's Newest Thread. Posted in » Electronics (Polish)
-
- » WTB: A6725ELW or TB62705CFN LED Drivers
- — The site's Last Updated Thread. Posted in » Electronic Components
-