I have been using PIC microcontrollers and have been using MikroC for the programming but I am little bit confused about the ports. On a PIC16F84A the port is defined in mikroC as TRISA = 0xFF
, and a bit of the port can be accessed by PORTA.f0
. But for other microcontrollers in the series a different code is used. For example, TRISIO = 0xFF
.
Can you please explain to me how I can know the code for accessing the ports that applies for every microcontroller out there? Also the input for a PIC is 1 and output is 0, and for Atmel the input 0 and output 1 which I found confusing if someone can explain?