Search found 157 matches

by Bobw
Thu Apr 14, 2011 1:57 am
Forum: Programming Tips & Tricks
Topic: Beginners tips for beginners
Replies: 0
Views: 4905

Beginners tips for beginners

I just finished my first project using flowcode V4 for PICs. I thought I would list a few things for first timers like myself. My project was to replace an every day TV antenna rotor control with something with position feed back and greater range of travel. 1) Define you project on paper. What do y...
by Bobw
Fri Mar 25, 2011 3:06 am
Forum: Flowcode V4
Topic: 16F1827 Read 1/2 pulse
Replies: 12
Views: 8574

Re: 16F1827 Read 1/2 pulse

Martin, And all others following this...... This is what I would call the final version. Running at 32 Mhz Really corrected accuracy issues EEPROM Read/Write is working. (had to paste in the C code for EEPROM to work) IR Zero/Home position sensor is working. (Not wired to the PIC) Positioning is +- ...
by Bobw
Thu Mar 24, 2011 1:41 pm
Forum: Flowcode V4
Topic: 16F1827 Read 1/2 pulse
Replies: 12
Views: 8574

Re: 16F1827 Read 1/2 pulse

I am trying to run the chip at 32MHz. I have the following added to the beginning of my C code: osccon = 0x70; osctune = 0x40; <--- not sure if I need this. Went to the chip configuration and ENABLED the PLL. Went to project options and set the clock speed for 32000000. Pointing accuracy is better t...
by Bobw
Mon Mar 21, 2011 2:27 pm
Forum: Flowcode V4
Topic: 16F1827 Read 1/2 pulse
Replies: 12
Views: 8574

Re: 16F1827 Read 1/2 pulse

Martin, I wish I had thought about writing the counting routine that way. Gave me much better accuracy than before. I still have about a 5 degree over shoot, but only when traveling >200 degrees. I can live with it. I have thought about a RUN AWAY or NO MOVEMENT routine to the program. Just been a b...
by Bobw
Sat Mar 19, 2011 10:09 pm
Forum: Flowcode V4
Topic: 16F1827 Read 1/2 pulse
Replies: 12
Views: 8574

Re: 16F1827 Read 1/2 pulse

Jan,

I may not have written it to proper way, but it works. That is just the part that stores the antenna position in EEPROM for future recall after a power down.
by Bobw
Sat Mar 19, 2011 4:04 pm
Forum: Flowcode V4
Topic: 16F1827 Read 1/2 pulse
Replies: 12
Views: 8574

16F1827 Read 1/2 pulse

I am using a Hall sensor to read gear position. there are 6 off and 6 on pulses per revolution. Using P_Count =3 per degree of movement I under shoot on a 360 rotation. Using P_Count =4 per degree of movement I over shoot on a 360 rotation. I either need to be able to count a 1/2 pulse, or move wher...
by Bobw
Tue Mar 01, 2011 5:24 am
Forum: Flowcode 4 Suggestions
Topic: Pulsed input simulation
Replies: 1
Views: 6968

Pulsed input simulation

Would be nice to have a pulsed input simulation (ON OFF ON OFF) to use on inputs in the simulator. This could be used as the representation of either a HALL Sensor, or other OPTO Sensor input. Would be even better if the frequency could be adjusted for just a few per second to many. While trying to ...
by Bobw
Tue Feb 22, 2011 10:43 pm
Forum: Flowcode V4
Topic: PIC 16F1827 Counting Pulses
Replies: 12
Views: 6498

Re: PIC 16F1827 Counting Pulses

Just a small update. I have it set to increment the Ant_Pos every 4 pulse changes. I also included an 8Ms delay before going back to counting the pulses again. Playing with the delay time I have gotten it down to a +-2 degree accuracy over a 540 degree rotation. Rare that I would ever go that far in...
by Bobw
Tue Feb 22, 2011 8:59 pm
Forum: Flowcode V4
Topic: PIC 16F1827 Counting Pulses
Replies: 12
Views: 6498

Re: PIC 16F1827 Counting Pulses

Opps should have said need to up date things every 4.8 to 4.9 pulses.
by Bobw
Tue Feb 22, 2011 8:57 pm
Forum: Flowcode V4
Topic: PIC 16F1827 Counting Pulses
Replies: 12
Views: 6498

Re: PIC 16F1827 Counting Pulses

Well here ya go. I found my counting problem on the CCW side. On a full swing from -90 degrees to +450 degrees I over rotate about 7 degrees. And if I swing back to -90 degrees the tick marks are dead on. Think I will play with a delay some where in the code, I have it set to increment the Ant_Pos e...
by Bobw
Tue Feb 22, 2011 4:57 am
Forum: Flowcode V4
Topic: PIC 16F1827 Counting Pulses
Replies: 12
Views: 6498

Re: PIC 16F1827 Counting Pulses

Will post what I have when I get home. (love midnight shift) Counts pulses very accuratly now (for one direction) wont count them for the other. 10 times told to go the same amount and each time marks lined up dead on. Ran out of time to look things over to see where I messed up. For others, in a nu...
by Bobw
Mon Feb 21, 2011 10:27 pm
Forum: Flowcode V4
Topic: PIC 16F1827 Counting Pulses
Replies: 12
Views: 6498

Re: PIC 16F1827 Counting Pulses

I may be setting my interrupt wrong. 1) Input from Switch (switch is resistor pulled high) looking for the LOW (Input is on RA2 pin1) 2) Interrupt set to RB0, calls macro flag_Low, set to trip on falling edge. 3) Macro simply adds 1 to the current pulse count Program, in simulation never sees the in...
by Bobw
Sun Feb 20, 2011 11:18 pm
Forum: Flowcode V4
Topic: PIC 16F1827 Counting Pulses
Replies: 12
Views: 6498

Re: PIC 16F1827 Counting Pulses

Dan, Speed is not what I am after. I need to know distance. I was wrong about the magnets, there are 6 on and 6 off. or one every 60 degrees of rotation of the pulse wheel. will have to manually rotate the thing and see how many revolutions it takes to spin the main output shaft 1 degree. I am using...
by Bobw
Sun Feb 20, 2011 5:11 am
Forum: Flowcode V4
Topic: PIC 16F1827 Counting Pulses
Replies: 12
Views: 6498

Re: PIC 16F1827 Counting Pulses

Interesting idea. I will give that a whirl when I get home later. Ate most my project time today tracing down a bad relay. I am almost 100% sure I am double counting the same pulse. May even try removing the magnetic ring (from CD ROM drive motor) and just use 3 for on,off,on.
by Bobw
Sat Feb 19, 2011 11:09 pm
Forum: Flowcode V4
Topic: PIC 16F1827 Counting Pulses
Replies: 12
Views: 6498

PIC 16F1827 Counting Pulses

One would think counting pulses from a Hall sensor would be kind of easy. Hall sensor delivers 0101010101010101 (8 off and 8 on) per revolution. In my code I am just looking at the OFF or LOW. Being that this is an AC motor that is driving the hall sensor speed is not constant. I am reading the puls...
by Bobw
Mon Feb 14, 2011 12:14 pm
Forum: Flowcode 4 Suggestions
Topic: EPROM Support
Replies: 2
Views: 7144

Re: EPROM Support

Steve, Thank you for the reply. I am sure it is a difficult task trying to find the balance. I just hope that it is reconsidered for future up-dates. I can understand dividing up functional differences between Home/Professional versions. But I think it needs to be looked at by what is EXTERNAL to th...
by Bobw
Mon Feb 14, 2011 12:18 am
Forum: Flowcode V4
Topic: EPROM Not supported in Student?
Replies: 6
Views: 4035

Re: EPROM Not supported in Student?

I agree, But it is almost limiting like saying you can only use to 1/2 the PIC ports. But my own fault, I thought they meant an External EEPROM not the one that is in the PIC. I could never have gotten this far this fast without flow code. I would still be trying to figure out what "C" code was. I w...
by Bobw
Sun Feb 13, 2011 9:04 pm
Forum: Flowcode 4 Suggestions
Topic: EPROM Support
Replies: 2
Views: 7144

EPROM Support

I have the home version of FC4. I love it. I must have misread the page that describes the differences from the Home to the Pro version. Built, tested, retested my file, (with much help from the forum). After being satisfied I had things the way I wanted I went to program my PIC. Only now did I disc...
by Bobw
Sun Feb 13, 2011 6:04 pm
Forum: Flowcode V4
Topic: EPROM Not supported in Student?
Replies: 6
Views: 4035

Re: EPROM Not supported in Student?

Lot of money for a 1 up project
by Bobw
Sun Feb 13, 2011 5:40 pm
Forum: Flowcode V4
Topic: EPROM Not supported in Student?
Replies: 6
Views: 4035

Re: EPROM Not supported in Student?

%$*#($&#*@*# MAN..... :oops:
This thing works perfectly except the EPROM part.
Yeah I read that data sheet, but thought EPROM was included.
I feel like that should have been a standard, not an add on.

Buyer be ware I guess.
by Bobw
Sun Feb 13, 2011 4:38 pm
Forum: Flowcode V4
Topic: EPROM Not supported in Student?
Replies: 6
Views: 4035

EPROM Not supported in Student?

I thought I was all done!, went to compile my file and received the following: "This version of flowcode will compile for the following components only" LED LEDarray LED7seg LED7seg4 LCDdisplay Switch Switchbank ADC Keypad PWM Formulaflowcode MIAC What NO EPROM???? I thought the student version incl...
by Bobw
Fri Feb 11, 2011 8:36 pm
Forum: Flowcode V4
Topic: THANK YOU
Replies: 1
Views: 3166

THANK YOU

To Benj, medelec35, Dan81, Sean, And all the others.....

Just have to button up a few things and call this one DONE !!!

I could not have done it with out your help.


Bob :mrgreen:
by Bobw
Thu Feb 10, 2011 12:33 am
Forum: Flowcode V4
Topic: Store and read from EPROM <Pic16F1827>
Replies: 8
Views: 6979

Re: Store and read from EPROM <Pic16F1827>

Hey, got it working. Didn't use a macro call, just added it to the end of the program. Just have to wait for my hall sensor to arrive and I can start putting this thing in a pretty box. Although not sure how many pulses are on the magnet ring I used, I think 16, but that is just some easy math to fi...
by Bobw
Wed Feb 09, 2011 6:24 pm
Forum: Flowcode V4
Topic: Store and read from EPROM <Pic16F1827>
Replies: 8
Views: 6979

Re: Store and read from EPROM <Pic16F1827>

Nope,
That helps very much.
When I did BASIC programming many years ago use to call them GOSUBs.
by Bobw
Wed Feb 09, 2011 5:55 pm
Forum: Flowcode V4
Topic: Store and read from EPROM <Pic16F1827>
Replies: 8
Views: 6979

Re: Store and read from EPROM <Pic16F1827>

Good, I think I am getting the hang of it all. Glad FC will let you copy parts of things from one saved file to another. I have kind of built my code in chunks and saved each under a different name as I went. Time to start putting it all together into one file. Can't thank you guys enough for all th...