need help about MickroC Compiler
Discussion in "PIC Microcontroller Discussion" started by nadeem malik Jun 21, 2008.
Sat Jun 21 2008, 12:24 pm
i have just started to learn micro C compiler
----------
i need some help
we can define a pin in kiel vision easily
sbit ab=P1^0;
problem is that h i can implement this thing in mickro C
----------
i need some help
we can define a pin in kiel vision easily
sbit ab=P1^0;
problem is that h i can implement this thing in mickro C
Mon Jul 07 2008, 09:23 pm
you cant do that in micro C
as i said.. i have not used MicroC yet.. but if you give me little time i can explain it
in CCS compiler you can define pins as..
as i said.. i have not used MicroC yet.. but if you give me little time i can explain it
in CCS compiler you can define pins as..
#define Some_Pin PORT_B4
Tue Jul 08 2008, 09:09 am
@nadeem malik
think you'll need bit masks for port bit-access.
Like (P1 & 0x01) for P1.0
(P2 & 0x08) for P2.3
etc.
think you'll need bit masks for port bit-access.
Like (P1 & 0x01) for P1.0
(P2 & 0x08) for P2.3
etc.
Tue Jul 08 2008, 09:10 pm
ANDing for clearing a bit and ORing for setting a bit is a common practice and applicable for every controller in world
Powered by e107 Forum System