Page 1 of 1

C for PICmicros 16 series - /* Ex 3.7 Working polished game

Posted: Fri Apr 13, 2012 11:35 am
by ndillane
I have been working my way through the "C for PICmicros 16 series course". I am using Eblocks Multi-programmer.

I successfully got through the first two lessons and also have had some success with lesson 3 "Follow The Leader" and I managed to get this program(/* Ex 3.7 Working polished game */) working properly initially.

However something seems to have changed in my setup that is now preventing me from moving forward.

When I now run the original program provided (/* Ex 3.7 Working polished game */) by Matrix it does not behave as it did in the past or as it should.

I have checked all my setup cables, settings, software and have even tried an alternative PIC, erased the PIC in case that was the issue but to no avail.

When I run the prog now it starts by lighting (PORTA) Led 0,then turns it off, then LED 1 and LED 3 light.e

This isn't even the starting sequence for the prog which should be:

/* Display a starting pattern */
porta = 0x0a;
delay( 40000 );
porta = 0x15;
delay( 40000 );

I'd really appreciate ideas on how I might resolve this


tks
Noel

Re: C for PICmicros 16 series - /* Ex 3.7 Working polished g

Posted: Mon Apr 16, 2012 1:42 pm
by ndillane
Anybody from Matrik Multimedia Ltd abe to offer any advice/support ?

Really stumped and I have made a big investment on hardware (programmer board and large selection of eblocks) and training materials

tks
Noel

Re: C for PICmicros 16 series - /* Ex 3.7 Working polished g

Posted: Mon Apr 16, 2012 3:37 pm
by Benj
Hello Noel,

It seems unlikely but your saying that code that used to work is no longer working so could the problem be the microcontroller device you are using? Maybe try switching it for a fresh microcontroller and see if this does the same thing. This way you can hopefully narrow the problem down to either hardware or software.

Re: C for PICmicros 16 series - /* Ex 3.7 Working polished g

Posted: Mon Apr 16, 2012 7:45 pm
by ndillane
I have tried tow different pic controllers so pretty sure its not the pic

tks
Noel

Re: C for PICmicros 16 series - /* Ex 3.7 Working polished g

Posted: Tue Apr 17, 2012 9:36 am
by Benj
Hi Noel,

Is it worth trying to reinstall the course, making a backup of your work first. This should reset the examples back to their original condition and hopefully allow them to work again.

Re: C for PICmicros 16 series - /* Ex 3.7 Working polished g

Posted: Tue Apr 17, 2012 10:05 am
by ndillane
I have also done that. I am running windows 7 natively on an Apple MacBook pro.
I am having some issues where the ppp programmer s/ware complains sometimes that it can't see the programming hardware. Then it will work away fine for a while.
Is there a way to compare what's actually in the pic with what should be as I am beginning to suspect the USB drivers

Tks
Noel

Re: C for PICmicros 16 series - /* Ex 3.7 Working polished g

Posted: Tue Apr 17, 2012 10:44 am
by DavidA
Hello,

You can read back the chip in PPP and save the results to a hex file, you can then compare that with the hex file generated by Flowcode, there will be some differences but the main program should be the same.