Find help, specifications and source code for the LPC900. The LPC900 challenges Microchip and AVR based on the worlds most popular 8-bit architecture the 80C51. With a 2-clock core the LPC900 series is a high performance, very flexible and low cost 8-bit microcontroller family. Designers using or interested in these devices are encouraged to share their know-how and ask questions.
Hi,
I'm sort of new at the LPC micros, but have some code apparently
compiled with the Keil compiler for a lPC938. I've got everything
compiling fine, except for the ADC code. The relevant portions of the
code are this:
(line 80): res = (XBYTE[AD0DAT0L_ADDR]<<2) | XBYTE[AD0DAT0R_ADDR]; //
res is declared as "uint16 res = 0;", this line is for channel 0
I get the following error when compiling:
AD.c: 180: error 88: illegal cast of LITERAL value to 'generic'
pointer from type 'literal-long-int' to type 'volatile-unsigned-char
generic* '
Can anyone shed some light on the problem? The XBYTE is defined in
ABSACC.H, which I had to find online, and defined like this:
#define XBYTE ((unsigned char volatile *) 0x20000L)
Thanks in advance,
Ryan
------------------------------------

(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )