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

For C and ASSEMBLY users to post questions and code snippets for programming in C and ASSEMBLY. And for any other C or ASM course related questions.

Moderators: Benj, Mods

Post Reply
ndillane
Flowcode V4 User
Posts: 6
Joined: Mon Mar 26, 2012 3:27 am
Been thanked: 1 time
Contact:

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

Post 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
Attachments
Ex37.c
The C program in question i.e. the completed program on lesson 3 - /* Ex 3.7 Working polished game */
(2.68 KiB) Downloaded 389 times

ndillane
Flowcode V4 User
Posts: 6
Joined: Mon Mar 26, 2012 3:27 am
Been thanked: 1 time
Contact:

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

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

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

Post 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.

ndillane
Flowcode V4 User
Posts: 6
Joined: Mon Mar 26, 2012 3:27 am
Been thanked: 1 time
Contact:

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

Post by ndillane »

I have tried tow different pic controllers so pretty sure its not the pic

tks
Noel

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

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

Post 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.

ndillane
Flowcode V4 User
Posts: 6
Joined: Mon Mar 26, 2012 3:27 am
Been thanked: 1 time
Contact:

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

Post 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

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

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

Post 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.

Post Reply