Pickit3 Debugger Express Need Help Getting Started

Thread Starter

ShayneW

Joined Oct 23, 2017
13
I have managed to getup to Lesson 3 on the rotating LED's and I have some build errors that I can't seem to figure out and change from the original C18 compiler into xc8.
The line that I am having trouble with is;

const rom int LED_LookupTable[8] @ 0x180 = { 1, 2, 4, 8, 10, 32, 64 , 128} ; (I changed the original from hexadecimal to decimal)

I believe what the program is doing is setting an array with 8 values and assigning them a memory address, but I am getting the following error.

../03 Rotate LED.c:65: error: (314) ";" expected.

I'm also getting an error on the time delay, but I have used this line before, so I'm pretty sure that is is fine, and will clear up once I have the table problem corrected.

I have attached the program file, any help would be greatly appreciated.
 

Attachments

Thread Starter

ShayneW

Joined Oct 23, 2017
13
I think simply const int LED_LookupTable[8] = { 1, 2, 4, 8, 10, 32, 64 , 128} ; Should work.
Spinnaker - That worked.... I'm been trying thing for a couple of hrs...would you mind explaining the information in the {}? are these memory locations on the chip

ps I also figured out the issue with the delay statement, I had a mistake in the delay statement.... I had #define _XTAL_FREQ = 8000000, should have been #define _XTAL_FREQ 8000000.
 

spinnaker

Joined Oct 29, 2009
7,830
Spinnaker - That worked.... I'm been trying thing for a couple of hrs...would you mind explaining the information in the {}? are these memory locations on the chip

.
Doubtful.

I would need to see the rest of the code to figure out what they represent.
 
Top