Page 1 of 1
Analog Example not working for me?
Posted: Tue Nov 01, 2011 4:16 am
by Werner
Hi Guys, I am working with the same program that is on the FlowCode Training Video 14 where we have a LED array and an ACD. The LED is tied to port B and the pot for the ACD is ADC0. Would the Vref be Dcc and Dss pins on the chip? (16F877A). And does the center tap of pot go to pin 2 on the chip as it shows on the simulator chip? I tried it this way I haven’t been able to get this to work. Thanks a lot for the help!!
Re: Analog Example not working for me?
Posted: Tue Nov 01, 2011 4:56 am
by allpicproject
Werner wrote: I tried it this way I haven’t been able to get this to work.
You mean ... you tried on hardware and it's didn't work ? or in flowcode ?
Re: Analog Example not working for me?
Posted: Tue Nov 01, 2011 8:38 am
by medelec35
Hi Werner.
Pin 2 looks correct.
The problem with your flowchart is the configuration settings.
E.g watchdog timer and low voltage programming you left as enabled. They both should be disabled.
Osc is set for RC, but it should be set for HS since it's an external crystal osc running above 4MHz.
You change these settings by going into Chip,Configure menu (Expert Config screen)
See:
http://www.matrixmultimedia.com/mmforum ... =26&t=6936
Vref is set for VDD (+5v) and VSS (0V) and it's connected internally, so you don't need to worry about vref connections.
Martin
Re: Analog Example not working for me?
Posted: Tue Nov 01, 2011 4:33 pm
by Werner
Thanks Guys,
Great link Martin very helpful!! The chip configure gets me every time. I made the changes that you suggested thanks. I am still not getting the hook up of my potentiometer? The way I have it now is Vdd and Vss going to the outer pins on my pot (with jumpers) with the center pin going to pin 2 on my chip (16F788A). My thinking is that I will vary the voltage 0-5 going to the analog input that will give 0-255 byte in the program? I am getting some change with the LEDs but not what I am getting with the simulator? One other thing Martin in the link you were talking about the MCLR or Master Clear Enable? There is no option for this when using the 16F877A chip right? Thanks for the help!!
[img]

- 2011-11-01 08.13.27_800x600.jpg (88.85 KiB) Viewed 9825 times
[/img]
Re: Analog Example not working for me?
Posted: Tue Nov 01, 2011 6:26 pm
by Benj
Hello,
The connection points you are showing in your picture are incorrect, can you connect the points to the actual chip's legs rather then using the expansion headers?
I would connect up like this.
Black Wire - GND Screw Terminal
Red Wire - +V Screw Terminal
Yellow Wire - Pin2 of uC or Pin 1 or the PortA D-type
Re: Analog Example not working for me?
Posted: Tue Nov 01, 2011 10:02 pm
by Werner
Ben I did what you said and lo and behold it works like magic!! Thank you Ben ,Martin, and Allpic so much!! What you suggested Ben is the way I originally had it hooked up but I think it was a combination of other problems in the chip configure that had me chasing the wrong solutions and switching my connections. From sad to happy in a few mouse clicks I love this programming stuff!
Have a great day Guys!
Re: Analog Example not working for me?
Posted: Wed Nov 02, 2011 8:20 am
by medelec35
Your welcome Werner, Glad we can all help you to get your hardware working
Werner wrote: There is no option for this when using the 16F877A chip right?
That's correct. Not every target device has this function.
Re configuration. Since it's a common issue, It would be nice if the defaults can be left so hardware will work assuming hardware was EB006 programmer.
I guess that can't be done?
Thanks for letting us know anyway.
Martin
Re: Analog Example not working for me?
Posted: Wed Nov 02, 2011 11:37 am
by Benj
Hello Martin,
Re configuration. Since it's a common issue, It would be nice if the defaults can be left so hardware will work assuming hardware was EB006 programmer.
I guess that can't be done?
We have built a way to do this into Flowcode v5. I have currently implemented this for the 16F88 and the 16F877A. Are there any other popular chips anyone would like to see that come with the pre-configured config settings for an EB006?
Re: Analog Example not working for me?
Posted: Wed Nov 02, 2011 1:36 pm
by allpicproject
Benj wrote: Are there any other popular chips anyone would like to see that come with the pre-configured config settings for an EB006?
If possible, please add for PIC16F887 n PIC16F1939.
Tq.
Re: Analog Example not working for me?
Posted: Wed Nov 02, 2011 3:40 pm
by Benj
No probs, Ill get these added. Any other requests?
Here is the current list.
16F88, 16F877A, 16F887, 16F1937, 16F1939, 16F1827
All devices are setup to run at 19.6608MHz using a HS oscillator with Watchdog and LVP disabled. Devices with a PLL config setting have their PLL disabled so the chips run at the correct speed without making any changes to the project options or the config settings.
Re: Analog Example not working for me?
Posted: Wed Nov 02, 2011 11:31 pm
by Werner
Thanks Ben! That will be great! Martin will have a lot of extra time on his hands! Haha I think you the best Martin!

Re: Analog Example not working for me?
Posted: Thu Nov 03, 2011 8:49 am
by medelec35
Werner wrote: Martin will have a lot of extra time on his hands!
I wish

Mrs will get me to do extra work around the house
Benj wrote:
We have built a way to do this into Flowcode v5.
That is good news Ben, thanks for that.
Can Flowcode users make their own alterations if they have a different chip to the ones which have been customised for EB006, Or is this restricted to Matrix staff only?
Martin
Re: Analog Example not working for me?
Posted: Thu Nov 03, 2011 10:11 am
by Steve
The default config info will be part of the FCD file (as it is now for FCDs like the MIAC and ECIO), so can be edited by anyone.