Analog Example not working for me?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Werner
Posts: 95
Joined: Sat Jun 11, 2011 4:12 am
Has thanked: 87 times
Been thanked: 31 times
Contact:

Analog Example not working for me?

Post 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!!
Attachments
Analogtest.fcf
(6.5 KiB) Downloaded 287 times
Werner
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"

allpicproject
Flowcode V4 User
Posts: 36
Joined: Thu Sep 01, 2011 11:10 am
Has thanked: 17 times
Been thanked: 1 time
Contact:

Re: Analog Example not working for me?

Post 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 ?
Attachments
Analogtest_zuki.fcf
(8.5 KiB) Downloaded 299 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: Analog Example not working for me?

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

Werner
Posts: 95
Joined: Sat Jun 11, 2011 4:12 am
Has thanked: 87 times
Been thanked: 31 times
Contact:

Re: Analog Example not working for me?

Post 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
2011-11-01 08.13.27_800x600.jpg (88.85 KiB) Viewed 8898 times
[/img]
Werner
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"

User avatar
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?

Post 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

Werner
Posts: 95
Joined: Sat Jun 11, 2011 4:12 am
Has thanked: 87 times
Been thanked: 31 times
Contact:

Re: Analog Example not working for me?

Post 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! :D

Have a great day Guys!
Werner
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"

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: Analog Example not working for me?

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

User avatar
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?

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

allpicproject
Flowcode V4 User
Posts: 36
Joined: Thu Sep 01, 2011 11:10 am
Has thanked: 17 times
Been thanked: 1 time
Contact:

Re: Analog Example not working for me?

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

User avatar
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?

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

Werner
Posts: 95
Joined: Sat Jun 11, 2011 4:12 am
Has thanked: 87 times
Been thanked: 31 times
Contact:

Re: Analog Example not working for me?

Post 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! :D
Werner
STUDENT OF: Martin - Professor of Flowcode, John, Jan, Fotios and Nicolas "Spanish Dude"

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: Analog Example not working for me?

Post by medelec35 »

Werner wrote: Martin will have a lot of extra time on his hands!
I wish :P Mrs will get me to do extra work around the house :lol:
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
Martin

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Analog Example not working for me?

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

Post Reply