EB006 kit with a PIC16F877A

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
kdonut@hotmail.com
Posts: 13
Joined: Tue Jan 15, 2013 11:25 pm
Contact:

EB006 kit with a PIC16F877A

Post 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....
Attachments
Hardware Troubleshooter.fcf
(25.71 KiB) Downloaded 365 times

kdonut@hotmail.com
Posts: 13
Joined: Tue Jan 15, 2013 11:25 pm
Contact:

Re: Welcome to the E-blocks forum

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

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Welcome to the E-blocks forum

Post 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...
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

kdonut@hotmail.com
Posts: 13
Joined: Tue Jan 15, 2013 11:25 pm
Contact:

Re: Welcome to the E-blocks forum

Post by kdonut@hotmail.com »

Yes. There is an 18F88 in the 18 pin socket

kdonut@hotmail.com
Posts: 13
Joined: Tue Jan 15, 2013 11:25 pm
Contact:

Re: Welcome to the E-blocks forum

Post 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

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: Welcome to the E-blocks forum

Post 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
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

kdonut@hotmail.com
Posts: 13
Joined: Tue Jan 15, 2013 11:25 pm
Contact:

Re: EB006 kit with a PIC16F877A

Post by kdonut@hotmail.com »

Any suggestions?

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: EB006 kit with a PIC16F877A

Post 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)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

kdonut@hotmail.com
Posts: 13
Joined: Tue Jan 15, 2013 11:25 pm
Contact:

Re: EB006 kit with a PIC16F877A

Post by kdonut@hotmail.com »

MSG.TXT attached.
Attachments
Hardware Troubleshooter.msg.txt
(968 Bytes) Downloaded 354 times

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: EB006 kit with a PIC16F877A

Post by kersing »

Could you try to compile and load the attached flowchart?
Attachments
Simple Test.fcf
(6.5 KiB) Downloaded 375 times
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

kdonut@hotmail.com
Posts: 13
Joined: Tue Jan 15, 2013 11:25 pm
Contact:

Re: EB006 kit with a PIC16F877A

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

kdonut@hotmail.com
Posts: 13
Joined: Tue Jan 15, 2013 11:25 pm
Contact:

Re: EB006 kit with a PIC16F877A

Post by kdonut@hotmail.com »

These are three of the attachments from my attempt. Will upload the rest in a minute.
Attachments
Simple Test.casm
(8.76 KiB) Downloaded 345 times
Simple Test.c
(3.87 KiB) Downloaded 305 times
Simple Test.asm
(8.45 KiB) Downloaded 293 times

kdonut@hotmail.com
Posts: 13
Joined: Tue Jan 15, 2013 11:25 pm
Contact:

Re: EB006 kit with a PIC16F877A

Post by kdonut@hotmail.com »

More of the upload files.
Attachments
Simple Test.msg.txt
(942 Bytes) Downloaded 247 times
Simple Test.hex
(852 Bytes) Downloaded 246 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: EB006 kit with a PIC16F877A

Post 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?
Martin

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: EB006 kit with a PIC16F877A

Post 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 13148 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

kdonut@hotmail.com
Posts: 13
Joined: Tue Jan 15, 2013 11:25 pm
Contact:

Re: EB006 kit with a PIC16F877A

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

kdonut@hotmail.com
Posts: 13
Joined: Tue Jan 15, 2013 11:25 pm
Contact:

Re: EB006 kit with a PIC16F877A

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

Chris_xjtlu
Posts: 13
Joined: Wed Mar 27, 2013 9:48 am
Has thanked: 10 times
Been thanked: 1 time
Contact:

Re: EB006 kit with a PIC16F877A

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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: EB006 kit with a PIC16F877A

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

Post Reply