Page 1 of 1

EB006 kit with a PIC16F877A

Posted: Wed Jan 30, 2013 12:52 am
by kdonut@hotmail.com
i am new to E Blocks and PiC programming in general. I just got the EB006 kit with a PIC16F877A chip. I wrote a simple code attached here. The code works on the emulator but i cannot get it to load to the chip. After writing the code using flowcode, I compiled to c and hex via the buttons in the flowcode toolbar. After that I hit the send to chip icon and it appears to go but I cannot get the hardware to work. I was reading some of the help files and checking some of my configurations. interestingly enough, when i told flowcode to autodetect the chip, it was giving me a different chip than 16F877A. My guess is that some of my configurations are off but have no idea which ones or what they should be set to. after having flowcode check for the most current version, i am getting the program to partially work but not correctly and definitely not the way that it works in simulation. finally, when i attempted to send the program to the chip, I got a message that stated that the hex was outside the parameters of the chip. I have no previous experience with flowcode nor PIC programming. Help please....

Re: Welcome to the E-blocks forum

Posted: Wed Jan 30, 2013 12:56 am
by kdonut@hotmail.com
Oh. One more thing. Reading the help file, it states "if you are using E Blocks, you may need a firmware update." i clicked the link to check for the latest firmware on the matrixmultimedia website and it comes up blank and says that the page may have moved.

Re: Welcome to the E-blocks forum

Posted: Wed Jan 30, 2013 1:18 am
by kersing
Have you checked the 16f877 is the only chip fitted? There should not be another chip in the two sockets next to the 40 pin socket. Usually there is a 16f88 in the 18 pin socket...

Re: Welcome to the E-blocks forum

Posted: Wed Jan 30, 2013 2:12 am
by kdonut@hotmail.com
Yes. There is an 18F88 in the 18 pin socket

Re: Welcome to the E-blocks forum

Posted: Wed Jan 30, 2013 2:19 am
by kdonut@hotmail.com
removed the 16F88 chip and autodetect chip now states the correct chip (16F877A). Still receiving error stating 'Hex file program memory is outside selected chip's memory range. Continue?" I clicked yes and compiler message is scrolling but at the end stated programming failed: Program Memory Check Failed

Re: Welcome to the E-blocks forum

Posted: Wed Jan 30, 2013 10:31 am
by dazz
Hi
Can you please sign up to the forums for your version of flowcode, the link is in my sig, that way people can see what version of flowcode you are using and it will enable a better responce

Re: EB006 kit with a PIC16F877A

Posted: Wed Jan 30, 2013 11:34 pm
by kdonut@hotmail.com
Any suggestions?

Re: EB006 kit with a PIC16F877A

Posted: Wed Jan 30, 2013 11:48 pm
by kersing
Please attach the output to a message. It allows us to see all the messages generated. (Output is in a file ...msg.txt in the directory your Flowcode source is stored in)

Re: EB006 kit with a PIC16F877A

Posted: Thu Jan 31, 2013 2:35 am
by kdonut@hotmail.com
MSG.TXT attached.

Re: EB006 kit with a PIC16F877A

Posted: Sat Feb 02, 2013 12:49 am
by kersing
Could you try to compile and load the attached flowchart?

Re: EB006 kit with a PIC16F877A

Posted: Sat Feb 02, 2013 7:26 pm
by kdonut@hotmail.com
I tried with the code you sent and no joy. When i loaded the hex, it asked if it was intended for an 18F device. I selected no, but went back and tried again selecting yes. Both cases did not work.

Re: EB006 kit with a PIC16F877A

Posted: Sat Feb 02, 2013 7:30 pm
by kdonut@hotmail.com
These are three of the attachments from my attempt. Will upload the rest in a minute.

Re: EB006 kit with a PIC16F877A

Posted: Sat Feb 02, 2013 7:33 pm
by kdonut@hotmail.com
More of the upload files.

Re: EB006 kit with a PIC16F877A

Posted: Sat Feb 02, 2013 8:41 pm
by medelec35
Hi Kevin,
We can rule out hex file as I loaded that file (you posted) with PPP, Sent to my 16F877A via EB006 and LED is flashing away at about 1Hz

What I did was load ppp directly from:
C:\Program Files (x86)\Flowcode\v5\Tools\PPP
Or if you have 32 bit PC:
C:\Program Files\Flowcode\v5\Tools\PPP
Selected Configure PIC Micro and selected 16F877A
Used File open, then loaded Hex file. Clicked Send to PIC Micro.
Sent ok1.png
(38.79 KiB) Downloaded 7741 times
So it sounds like an issue with your target device selection?
I could be wrong of course.

I don't know why you would get a prompt about 18F device?
Did you select correct device from Configure PIC Micro on PPP?

Re: EB006 kit with a PIC16F877A

Posted: Sat Feb 02, 2013 9:36 pm
by dazz
Hi
A bit of a long shot, but i've had to use the following settings on occasion ,click build project options configure chip the try the settings in the attached image, circled in blue, may or may not work

Regards
Dazz
op.jpg
op.jpg (116.9 KiB) Viewed 14079 times

Re: EB006 kit with a PIC16F877A

Posted: Sun Feb 03, 2013 7:18 pm
by kdonut@hotmail.com
Tried both of the above suggestions with no luck.

Could the parameters on the compiler or programmer be problem?
Currently, compiler parameters are:
-v -t PIC%p "%f.c"

programmer parameters are:
-cs 2 -chip PIC%p -nogui "%f.hex"

Re: EB006 kit with a PIC16F877A

Posted: Wed Feb 06, 2013 3:23 am
by kdonut@hotmail.com
Turns out to have been the parameters. for this configuration the programmer parameters should have been
-cs 2 -chip PIC%p -config

Thanks for those that helped.

Re: EB006 kit with a PIC16F877A

Posted: Mon Apr 15, 2013 6:59 am
by Chris_xjtlu
kdonut@hotmail.com wrote:Turns out to have been the parameters. for this configuration the programmer parameters should have been
-cs 2 -chip PIC%p -config

Thanks for those that helped.
Hi,
I seem to be having similar problems. where can i modify these pareameters?

Re: EB006 kit with a PIC16F877A

Posted: Mon Apr 15, 2013 10:19 am
by medelec35
Hi Chris,
To modify chip parameters select 'Build', 'Compiler Options' then you want the 'Programming' Tab

You could try In the option list click drop down arrow and select default.

Correct settings should be:
http://www.matrixmultimedia.com/support ... f=68&t=805

Don't forget to click on save icon after altering any settings.