Hi! In Hello example for 8051 by MCB900 in main() there is: P2M1=0; P1M1=0; Is it ok?? Im reading the datasheet of de microcontroller and i dont understand it, because to configurate the port is using PxM1 and PxM2. Then why is writed these (bold text)?? Thanks
1) You haven't told us which chip you are using. MCB900 supports a lot of different chips.
2) You haven't told us what datasheet you have been reading.
3) You haven't told us what configuration you want.
If you have a configuration register somewhere, the "right" value depends on what you want. If everyone wanted the same thing, then there would be no need for a configuration register in the first place...
If you read the user manual for the P89LPC93x, there is a chapter "I/O Ports" that describes the port output configuration settings. It has a great description of these registers.