Analog Example not working for me?
Moderator: Benj
Analog Example not working for me?
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!!
- Attachments
-
- Analogtest.fcf
- (6.5 KiB) Downloaded 338 times
Werner
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
-
- Flowcode V4 User
- Posts: 36
- Joined: Thu Sep 01, 2011 11:10 am
- Has thanked: 17 times
- Been thanked: 1 time
Re: Analog Example not working for me?
You mean ... you tried on hardware and it's didn't work ? or in flowcode ?Werner wrote: I tried it this way I haven’t been able to get this to work.
- Attachments
-
- Analogtest_zuki.fcf
- (8.5 KiB) Downloaded 364 times
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Analog Example not working for me?
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
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
Martin
Re: Analog Example not working for me?
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] [/img]
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] [/img]
Werner
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
- 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: Analog Example not working for me?
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
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
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Analog Example not working for me?
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!

Have a great day Guys!
Werner
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Analog Example not working for me?
Your welcome Werner, Glad we can all help you to get your hardware working
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

That's correct. Not every target device has this function.Werner wrote: There is no option for this when using the 16F877A chip right?
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
Martin
- 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: Analog Example not working for me?
Hello Martin,
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 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?![]()
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 36
- Joined: Thu Sep 01, 2011 11:10 am
- Has thanked: 17 times
- Been thanked: 1 time
Re: Analog Example not working for me?
If possible, please add for PIC16F887 n PIC16F1939.Benj wrote: Are there any other popular chips anyone would like to see that come with the pre-configured config settings for an EB006?
Tq.
- 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: Analog Example not working for me?
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Analog Example not working for me?
Thanks Ben! That will be great! Martin will have a lot of extra time on his hands! Haha I think you the best Martin! 

Werner
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Analog Example not working for me?
I wishWerner wrote: Martin will have a lot of extra time on his hands!


That is good news Ben, thanks for that.Benj wrote: We have built a way to do this into Flowcode v5.
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
Martin