I want to interface MCB2140 with a pressure sensor which will give input for every 1 second.. I connected UART0 to pressure sensor output, UART1 to serial port of PC. The pressure sensor gives the integer value as output.The UART0 will receive data from sensor and should display in hyper terminal for every 1 minute..I wrote the following code..The code gets hanged in startup file at BX R0...Please let me know any other changes required #include <LPC21xx.H> void init_serial (void); int main(void) { init_serial();
while(1) { int getc_serial0; int putc_serial1; } } void init_serial (void) {
PINSEL0 = 0x00050005;
U0LCR = 0x00000083;
U0DLL = 98;
U0LCR = 0x00000003;
U1LCR = 0x00000083;
U1DLL = 98;
U1LCR = 0x00000003;
}
int getc_serial0(void)
{
while (!(U0LSR & 0x01));
return U0RBR;
} int putc_serial1(void)
while (!(U1LSR & 0x20));
U1THR=U0RBR;
return (U1THR);
Hi Andrew neil, So for learning the embedded coding i have to come from india to USA or other countries to attend seminars. I think this is the costliest suggestion to learn embedded development in total forum. Please do not make fun of the guys who are new to embedded development in future atleast.. Here all other profiles (like per westermerk, etc... ) are giving good suggestions, but your's is the only bad suggestion
Not at all!
I'm sure there are plenty of good training providers in India.
www.lmgtfy.com
">http://www.keil.com/events/ link that I gave you, the Design Strategies for ARM Systems series is being prsented worldwide:
http://www.keil.com/events/seminar/222.htm
Dates for Asia: www.em.avnetasia.com/.../
This is just one series from just one distributor - there must be plenty more...
"I think this is the costliest suggestion"
The cheapest solution is not necessarily the most effective - nor the best value
"Please do not make fun of the guys who are new to embedded"
I'm not making fun of anyone; just pointing out that learning embdedded development requires a significant commitment and investment - in time, or money, or both.
Note also that there is much more to embedded development than just "coding".