Hi,
Disclaimer:
you are going to read a foolish, damn beginner, novice, ordinary question.
The question starts from here:
I've met a way of PIC MCU pin assignment which is new to me:
The style I knew from before is like:
Could anyone please explain how the initial method works?
Also, in the codes I see:
Does anyone knows about this file or could point me to an article about its usage? I guess that it is a way of defining/assigning ports of PIC, but I need something more than "guess" to work with
Disclaimer:
you are going to read a foolish, damn beginner, novice, ordinary question.
The question starts from here:
I've met a way of PIC MCU pin assignment which is new to me:
Code:
sbit CS=P2^5; //Chip select
The style I knew from before is like:
Code:
void main()
{
TRISB = 0; // Configure PORTB as output
PORTB = 0xAA; // Turn on odd numbered port pins
}
Could anyone please explain how the initial method works?
Also, in the codes I see:
Code:
#include "reg52.h"
Does anyone knows about this file or could point me to an article about its usage? I guess that it is a way of defining/assigning ports of PIC, but I need something more than "guess" to work with