I have problems with the the two functions inportb and outportb. They don't function and I don't find them in any headerfile. I want to program the serial interface 0 of the 80C537. I have the evaluation software from Keil. Can you help me? Do I only need an extra headerfile? Thanks
Why would you find them? They are not part of ISO C. What are you trying to do? Look at my UART driver (I sound like a broken record) at http://www.embeddedfw.com at the bottom of the page. The UART0 on the '537 should be similar if not identical. Notice my uart.c file does not require any device header file - it stands on its own. You will see that there is no need for an inpb outpb function since there are no port mapped registers in the 8051. Everything is memory mapped, however, the special function registers must be accessed using extensions to C, e.g. sfr and sbit. For example to access Port 0
sfr r_port0 = 0x80; if (0xAA == r_port0) r_port0 = 0x55;