Search found 170 matches

by GTF
Sun Sep 16, 2012 4:26 pm
Forum: Flowcode V5
Topic: ADC read problem
Replies: 13
Views: 8333

Re: ADC read problem

Have you tried filtering capacitor on input pin of the PIC? How about different potentiometer with lower resistance? There is a 470nf cap and a 100k pulldown on the circuit. The pot is already proven with other controllers/firmware. I have also tried multiple samples/averaging with the same results...
by GTF
Sat Sep 15, 2012 4:02 pm
Forum: Flowcode V5
Topic: ADC read problem
Replies: 13
Views: 8333

Re: ADC read problem

More odd behaviour...... If I disable the second read of the neutral position it is the first minimum duty cycle determination that does not work correctly. Although the targeted position change is reported, there was no change in voltage on the meter, no movement and no PWM applied. In this case th...
by GTF
Sat Sep 15, 2012 4:55 am
Forum: Flowcode V5
Topic: ADC read problem
Replies: 13
Views: 8333

Re: ADC read problem

Here is the problem. The calibrated minimum Duty Cycle for 1 direction ends up too low (and possibly too high the other direction).
Image
I have attached the Flowcode I used for this experiment.

Edit: added some comments to the flowchart
by GTF
Sat Sep 15, 2012 12:59 am
Forum: Flowcode V5
Topic: ADC read problem
Replies: 13
Views: 8333

Re: ADC read problem

Here is what the 18F14K50 is reporting via USB to serial vs what my meter reads. The int reads of 755, 757, 759, 755 correspond to meter values of 3.490, 3.496, 3.492, 3.490V. The second int neutral read is always greater than the preceding int read even though it is less(and should be) on the meter.
by GTF
Thu Sep 13, 2012 1:42 am
Forum: Flowcode V5
Topic: ADC read problem
Replies: 13
Views: 8333

Re: ADC read problem

Here is a new example and video demonstration. This one runs in both directions ( 2 loops). I corrected errors in the earlier example where I did not select "10 bit" duty cycle. My actual project code does not have that error. This time I added 1 sec of PWM activation at a DC of 600, followed by a 5...
by GTF
Wed Sep 12, 2012 5:41 pm
Forum: Flowcode V5
Topic: ADC read problem
Replies: 13
Views: 8333

Re: ADC read problem

The max value is approximately 4.5V. My current Vref/VDD is 4.75V I have also done the same thing in the reverse direction. In that case the target to end the loop is a value slightly below the initial read, and there seems to be a similar offset occurring. In both cases the first loop read is alway...
by GTF
Wed Sep 12, 2012 4:28 pm
Forum: Flowcode V5
Topic: ADC read problem
Replies: 13
Views: 8333

Re: ADC read problem

Hello Enamul, Sorry if my post was confusing. The .02V is just an example of a value that will not work because of this problem. I actually would like to use a value of only .005V or so, but am forced to use a value greater than .03V, which is at least 1 degree of rotation of the mechanism and is cl...
by GTF
Wed Sep 12, 2012 3:15 pm
Forum: Flowcode V5
Topic: ADC read problem
Replies: 13
Views: 8333

ADC read problem

Hello All, I am working with an 18F14K50. A portion of my program is intended to detect the minimum 10 bit PWM duty cycle required to initiate a position change. I am first reading the pot with the PWM disabled, then continuously re-reading as the PWM is gradually increased. What I have noticed is t...
by GTF
Sat Aug 25, 2012 8:35 pm
Forum: Flowcode V4
Topic: Floating point.
Replies: 8
Views: 6948

Re: Floating point.

I know this is an old thread but what about something like this example for those of us who are code challenged.

Grant
by GTF
Tue Apr 03, 2012 2:37 pm
Forum: General Programming
Topic: Change program start address?
Replies: 4
Views: 3545

Re: Change program start address?

Thanks Ben. It works for me now as well. :? I didn't have to change anything as I already had it set up that way. Must have been the last iteration I tested.
by GTF
Mon Apr 02, 2012 3:23 pm
Forum: General Programming
Topic: Change program start address?
Replies: 4
Views: 3545

Re: Change program start address?

Hi Ben,

If I use the space I receive the following assembly error: Error: Failed to open:0x1000.
Is there a particular point in the default parameter line where I need to insert this?

Grant
by GTF
Mon Apr 02, 2012 2:08 pm
Forum: General Programming
Topic: Change program start address?
Replies: 4
Views: 3545

Change program start address?

Can this be done? I have tried adding a switch "-rb0x1000" to the linker parameters but it has no effect. I'm using a 18F14K50

Grant
by GTF
Thu Mar 22, 2012 4:18 am
Forum: General Programming
Topic: Inputing an analogue voltage signal
Replies: 5
Views: 4108

Re: Inputing an analogue voltage signal

Here you go.......
by GTF
Wed Mar 21, 2012 11:03 pm
Forum: General Programming
Topic: Inputing an analogue voltage signal
Replies: 5
Views: 4108

Re: Inputing an analogue voltage signal

It appears that you are nudging the motor in 1 direction or the other for 1 sec and then reading the analog input. If during this 1 sec period the target(200) is overshot it will not equal 200 and the motor will continue to nudge in the same direction. Perhaps while loops that end when the target is...
by GTF
Thu Mar 15, 2012 4:44 am
Forum: Flowcode V5
Topic: EEPROM issue?
Replies: 4
Views: 3457

Re: EEPROM issue?

The loop is to end when A is outside the limits, so that code appears to be correct. I have tried brackets/no brackets before. My actual code has brackets. The signed integers may have helped get this example working on my hardware. I also had to initially increase the max_limit by 50 over the learn...
by GTF
Wed Mar 14, 2012 2:41 pm
Forum: Flowcode V5
Topic: EEPROM issue?
Replies: 4
Views: 3457

Re: EEPROM issue?

Hello Jonny, I have tried simply using the learned values as the limits as well as the signed integers. The result is the same. I have 2 separate sensors in the application and the same thing is happening with both of them. At times it has been OK in the forward direction(decreasing V), but a little...
by GTF
Wed Mar 14, 2012 4:15 am
Forum: Flowcode V5
Topic: EEPROM issue?
Replies: 4
Views: 3457

EEPROM issue?

Hi, I'm using a 18F14K50 in a PWM position control application with a 0-5V analog sensor. I am writing the learned max, neutral and min values to EEPROM in a learn procedure. The values are read at startup and my routine loops until various variables go out range. The loop and hardware appears to fu...
by GTF
Sat Jan 21, 2012 2:28 pm
Forum: Flowcode V4
Topic: V5 Upgrade ?
Replies: 69
Views: 39530

Re: V5 Upgrade ?

I am having a similar issue to Simon( post # 23)with the free V5 upgrade to my recently purchased V4. After completing the form as shown by Simon, being shown the new key and clicking on "Download Link" I was simply returned to the blank form. I received an email message with the key as well and a l...
by GTF
Fri Dec 16, 2011 9:57 pm
Forum: General Programming
Topic: ADC11 unavailable in V4.5 for 18F14K50
Replies: 3
Views: 3140

Re: ADC11 unavailable in V4.5 for 18F14K50

Thanks for the fast response Martin. That should do the trick. :)
by GTF
Fri Dec 16, 2011 8:38 pm
Forum: General Programming
Topic: ADC11 unavailable in V4.5 for 18F14K50
Replies: 3
Views: 3140

ADC11 unavailable in V4.5 for 18F14K50

Hello, Don't seem to be allowed to post in the V4 forum so I'll post here. Just starting out with Flowcode. I'm working with a board that utilizes ADC11 on a PIC18F14K50 but only ADC3 through ADC10 connections are available in V4 for this device. ADC3 through ADC11 are listed in the generated C code...