amayilsamy
Advanced Member level 1
- Joined
- Feb 5, 2013
- Messages
- 420
- Helped
- 38
- Reputation
- 76
- Reaction score
- 34
- Trophy points
- 1,308
- Location
- Chennai,India
- Activity points
- 3,370
I want interfacing 7-segment with lpc2148.
I'm using the port pins is [a:dp] =P0[8:15]
First I need a code for HOW ON/OFF P0[8.15] only.
I wrote code already but it is not working
I post my code here....
defines.h code..
I'm using the port pins is [a:dp] =P0[8:15]
First I need a code for HOW ON/OFF P0[8.15] only.
I wrote code already but it is not working
I post my code here....
Code:
#include<LPC214x.h>
#include"defines.h"
#include"delays.c"
int main(void)
{
PINSEL0 = 0x00000000;
IO0DIR &= 0xFFFFFFFF;
while(1)
{
IO0SET &= 0xFFFFFFFF;
delay_ms(2500);
IO0CLR |=0xFFFFFFFF;
delay_ms(2500);
}
}
defines.h code..
Code:
# define IO0PIN = (IO0PIN && 0xFFFF00FF) && 0x0000FF00 ;