AtomSoft
Well-Known Member
This is what i needed it for
To create a GLCD Port
Code:
#include <LPC210x.h>
void GlcdPort(unsigned long Data){
IOPIN = ((IOPIN & 0xFFFFFF00 ) | Data);
}
void DelayUs(int us) {
for (; us>0; us--);
}
void DelayMs(int ms) {
for (; ms>0; ms--)
DelayUs(1000);
}
int main(void){
unsigned char x;
PINSEL0=0x00;
IODIR=0xFFFFFFFF;
while(1){
for(x=0;x<8;x++){
GlcdPort(0xFE);
DelayMs(500);
}
}
}
To create a GLCD Port
Last edited: