RFdata
Newbie level 6
Hi, I need some help with declaring adress in c compiler for a 89S8253:
80h P0 11111111
81h SP 00000111
82h DP0L 00000000
83h DP0H 00000000
84h DP1L 00000000
85h DP1H 00000000
86h SPDR ########
87h PCON 00XX0000
This are the default byte addressable registers in the data sheet of the 89S8253,
for example this means that all the pins of the P0 are at 1 ??
If I want to have like 10101010 in port 1 what i have to do in the compiler?
sfr at (0x80) P0 //indicates the P0 adress
P0= 10101010b //send data to P0
Is this procedure correct? How can I declare the P0 output or input?
I´m confused about byte addressable registers and bit addressable registers
sfr at (0x80) P0 or sbit at (0x80) P0_0 they have the same andress , or for example sbit at (0x81) P0_1 is it adress the same adress of the SP that is at 81h?
Any help is welcome
Tanks
80h P0 11111111
81h SP 00000111
82h DP0L 00000000
83h DP0H 00000000
84h DP1L 00000000
85h DP1H 00000000
86h SPDR ########
87h PCON 00XX0000
This are the default byte addressable registers in the data sheet of the 89S8253,
for example this means that all the pins of the P0 are at 1 ??
If I want to have like 10101010 in port 1 what i have to do in the compiler?
sfr at (0x80) P0 //indicates the P0 adress
P0= 10101010b //send data to P0
Is this procedure correct? How can I declare the P0 output or input?
I´m confused about byte addressable registers and bit addressable registers
sfr at (0x80) P0 or sbit at (0x80) P0_0 they have the same andress , or for example sbit at (0x81) P0_1 is it adress the same adress of the SP that is at 81h?
Any help is welcome
Tanks