FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Sat Jan 31, 2009 10:40 am |
|
|
As previously repoprted, CCS wasn't able yet to supply a devices.dat and device include file, that gives full support of PIC24FJ128GA parts. They have forgotten e.g. UART 3 and 4. You can use the Device Editor tool to supplement the missing interrupt information and add the SFR definitions to the device file manually. Or, simply specify PIC24FJ128GBxxx.
I just realized, that I didn't read your post thorougly, as you are already talking of the xxxGB chip. You have to define the respective SFR and functions by yourself, e.g.:
Code: | #word U3MODE = 0x250
#word U3STA = 0x252
#byte U3TXREGL = 0x254
#byte U3TXREGH = 0x255
#byte U3RXREGL = 0x256
#word U3BRG = 0x258
#bit U3EN = 0x250.15
#bit U3OERR = 0x252.1
#bit U3RXIF = 0x8E.2
#bit U3RXIE = 0x9E.2
#bit U3TXIE = 0x9E.3
#bit U3TXBF = 0x253.1
#bit U3TRMT = 0x253.0
#bit U3ERIF = 0x8e.2
void putc_u3(char c)
{
while (U3TXBF);
U3TXREGL = c;
}
char getch_u3(void)
{
U3RXIF = 0;
return U3RXREGL;
}
#define kbhit_u3() (U3RXDA) |
|
|