Page 1 of 1

Can not get Chip to work

Posted: Fri Mar 12, 2010 2:50 pm
by trisb
Hi, Guys

I am on a very steep learning curve here, and i am look for a bit of help this my first time using pic micro's.

I am having trouble getting ANY chip/software to run. I have tried all the normal suggestions. Clock Ect,
and in all the setup configs i have tried i have only got the Low voltage enabled. I have now been play with this for over a week :cry:

Here is what i am Doing.

As a test i have just done a simple code with a LED on one out put Flashing on and off ever 3 sec. And another file with a switch on one input and a LED on the other.

I have set all the Clock speeds in the options and have it set in HS in both flowcode chip settings a PPP. but when i load it in the chip does nothing. I have tried to load it via flowcode and via PPP.
I have tried to run the chip in the EB007 v7 board and on the board i have had made but i am still not getting any where,
I have also tried to run the chip in RC mode and in XTAL mode and am still not getting much luck.

i have also found the only way i can program the a chip on the EB007 is if i have the board set to RC mode, these are the chips i have tried, 16f877, and 18f458.


Any help would be very appreciated.

Tristan

Re: Can not get Chip to work

Posted: Fri Mar 12, 2010 4:22 pm
by Benj
Hello Tristan

I have had a look at your configuration settings and also modified the Flowcode file so that it is a bit better for showing what is going on.

Have you connected a wire from the +V screw terminal on the EB006 programmer to the +V screw terminal on the EB007 switch board? Switch inputs will not work correctly otherwise.

Also make sure that the slide switch SW2 on the EB006 is in the XTAL position and also make sure that the crystal X1 is sitting in its socket correctly.

Re: Can not get Chip to work

Posted: Fri Mar 12, 2010 4:54 pm
by trisb
HI Ben

I am not using a switch board, I am using the programmer to program the chip with this file, then drop the chip it to the board i have had made. so i will try your modified file in my board, if this fails I will make up a switch board to plug in to the EB006.
and give this a go. Am I also right in saying I will need a external 5v supply on going to the programmer if i am in the XTAL mode on the board when programming. as at the moment when i go to program with this switch in XTAL mode just running on USB power Flowcode will come up with 5Error code and a few others. and will not program the chip.

The only file i have tried to run in on Programmer board is a simple led on for 3secs led off 3sec loop. and i was testing the out put with a DVM and even this failed.

I will try your file and config and see where this get me... hopefully not in a mental hospital :lol:

Thanks

Tris

Re: Can not get Chip to work

Posted: Fri Mar 12, 2010 5:48 pm
by Benj
Hello Tris

Low voltage programming of PICmicros is quite tricky and painful so I would advise you get a 12V - 14V power supply. You should be able to pick one of these up for around 5 from an Argos etc.

Once you have the power supply connected move the jumper back from the USB to PSU position and your chips should then program correctly.

Let me know how you get on.

Re: Can not get Chip to work

Posted: Mon Mar 15, 2010 7:38 am
by trisb
Hi, Ben,

I have managed to make some progress this weekend, after making a LCD board to plug into the EB 006, And putting flowcode on a new Laptop. i have managed to get the famous Hello World to come out on the LCD. :) could not getting working on my production boards as the chip will not run at all on them. i think either the Crystal is bad or the MCLR is playing up....... looks like a board re spin is in order. :cry:

any way
After managing to at least get the LCD to run on the EB006 board, i thought i would try a simple LED on when a input is hight, LED off when Input is low... led comes on but will not go off right a way, this is where i have now run in to my next problem. I have all the setting right in Flowcode and have the EB006 board set to XTAL , but i am finding a 1sec delay is taking about 20 seconds. after reading some posts i thought i would try putting a c code command at the start of the flowcode. but when i go to load this in to my pic i get this.

C:\Documents and Settings\Tristan.TRISTAN-604DF9E\My Documents\FlowCode\Flowcode1.c(130:2): error: unknown identifier 'osccon'
C:\Documents and Settings\Tristan.TRISTAN-604DF9E\My Documents\FlowCode\Flowcode1.c(130:2): error: invalid operand 'osccon'
C:\Documents and Settings\Tristan.TRISTAN-604DF9E\My Documents\FlowCode\Flowcode1.c(130:9): error: failed to generate expression
Flowcode1.c success

failure

Return code = 1

Flowcode was unable to compile the flowchart's C code due to the following errors:


If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.

Any suggestions.

as I would like to get the timing thing sorted as, this will affect my final program quite alot.

Thanks

Tristan

Re: Can not get Chip to work

Posted: Mon Mar 15, 2010 9:56 am
by Benj
Hello Tristan

Delays coming out at the wrong speed would indicate that the clock speed or the configuration are not quite correct. I would check your project options window and ensure that the clock speed matches the crystal on the board (19660800 by default) I would also check your configuration, If you have the Oscillator set to XT then try the HS option. Also make sure you are disabling the watchdog timer.

The osccon code is to drive an internal oscillator which by the compilation errors looks like your device does not support this.

Re: Can not get Chip to work

Posted: Mon Mar 15, 2010 3:56 pm
by trisb
Hi, Ben

I did check the project options was set to 19660800, and also check that the Oscillator was set to HS option, to match the EB006 board crystal, but i was still finding it to run slow.

Is there any thing i am missing. or is the crystal on the board bad.

Trisb

Re: Can not get Chip to work

Posted: Mon Mar 15, 2010 4:29 pm
by Benj
Hello Tristan

I take it the oscillator switch on the EB006 is set to the XTAL position and the J18, J19 jumper is set to OSC.

If you like you can attach your Flowcode program and I will check it for you but I think we have covered most of the basics now. Could be a faulty crystal I have come across a couple of these whilst checking through returns. If so then the crystal is removable and you should be able to fit another crystal straight in without doing any soldering.

Re: Can not get Chip to work

Posted: Thu Mar 18, 2010 2:08 pm
by trisb
HI Ben.

I will give the Oscillator a look. now i have got my head round things i have a long list of jobs to do using this software. so I am working an a Flow sensor/temp project at the moment, and have been running some tests using internal. and so far so good.

I do have a question in relation to my flow sensor/temp monitor, but i will start a new post for that.

Thanks for all of your help. and getting me going in the right direction.

Thanks

Tristan