Hello!
There are many sources published by TI and explaining how to do basically anything.
As the 2274 device is about 5 years old, I guess the source code is very reliable.
As for your code, is it the whole code?
In this case, no surprise that you have errors. Let's suppose I am the compiler (or a bit more):
- Your UART_init function is empty
- Serial send defines PORTD without any link with the hardware.
You define PORTD as an unsigned int, so it will behave as you defined it, as a variable,
not as a port. For your info, the F5X series have 16-bytes ports called PA ~ PE.
For each of these ports, you have a PNDIR, PNSEL, PNSEL, PNREN (N being either of {A..E}),
not PORTD. But you can of course #define PORTD PDOUT if you want
But I don't think these 16-bit ports exist on F2X devices. Please verify. Most likely the port
names are PXDIR, PXSEL, PXOUT and PXIN, x being either of {1..10 depending on the model}
- You define a TRISD variable which is set but never used.
- You call an undefined UART_Write function
- You call an undefined Delay_ms function
So I would recommend that you take some TI reference code, and learn how to send one byte
using one of the UARTs. Then plug your device and try to send a byte to it just to verify that
your PC or cell phone can handle it. Once this works, you can start fiddling with more tricky
tasks.
Dora.
PS: By the way, you are asking for free help. In this case, NEVER say it is urgent!