Search found 157 matches

by Bobw
Wed Feb 09, 2011 3:19 pm
Forum: Flowcode V4
Topic: Store and read from EPROM <Pic16F1827>
Replies: 8
Views: 6979

Re: Store and read from EPROM <Pic16F1827>

Not sure if I am going about this the most clean way. Write to EPROM example: NUMtoSTORE can = -90 to 450 NUMtoSTORE>255 If NUMtoSTORE= Str_High = 255 <--- put 255 in EPROM location 0 Str_low = NUMtoSTORE - 255 <----- Put 95 into EPROM location 1 If NUMtoSTORE<0 Then Pos_Neg=0 <----- Puts 0 into EPR...
by Bobw
Wed Feb 09, 2011 1:47 am
Forum: Flowcode V4
Topic: Store and read from EPROM <Pic16F1827>
Replies: 8
Views: 6979

Store and read from EPROM <Pic16F1827>

I need to store an integer that will be anywhere from -90 to 450 into EPROM and be able to read it on power up.
I have downloaded several of the sample files I have found but I am still having issues. Anyone have a very simple example?

Bob
by Bobw
Tue Feb 08, 2011 2:15 am
Forum: Components (Other)
Topic: Quadrature Encoder
Replies: 9
Views: 14402

Re: Quadrature Encoder

Well I tired it in real life. It does work, but I am using a small toothed encoder wheel. It may over count if the opening is in the right spot. Think I will try a hall sensor and see what results I get with that. Found my notes from when I was calculating the motor revolutions that equal one degree...
by Bobw
Mon Feb 07, 2011 9:21 pm
Forum: Components (Other)
Topic: Quadrature Encoder
Replies: 9
Views: 14402

Re: Quadrature Encoder

Sean, Thanks for the file. It got me thinking (dangerous thing). Since The program is energizing the motor either CW or CCW, I do not need to count pulses until that time. Why couldn't I just read the highs from one of the 2 outputs of the encoder? Here is a quick run down of how things are suppose ...
by Bobw
Sun Feb 06, 2011 2:29 pm
Forum: Components (Other)
Topic: Quadrature Encoder
Replies: 9
Views: 14402

Re: Quadrature Encoder

Should have looked first. <PIC16F1827> HAS interrupt on change on both RA2 and RA3 so guess I am in luck. now to figure out how to use it.
by Bobw
Sun Feb 06, 2011 2:25 pm
Forum: Components (Other)
Topic: Quadrature Encoder
Replies: 9
Views: 14402

Re: Quadrature Encoder

After learning more, and now having a registered version of Flowcode, it came to mind that I do NOT have to look at direction. I am already controlling direction, so I just need to count the number of pulses. In my case when "Pulse_Cnt =320 then Ant_Pos = Ant_Pos +1" "Pulse_Cnt=0" My original though...
by Bobw
Sat Feb 05, 2011 5:57 pm
Forum: Flowcode V2 & V3
Topic: Suggestion for program flow
Replies: 1
Views: 2913

Suggestion for program flow

I am writing a program to control the direction of a motor either CW or CCW. 1) User (via POT) sets the desired position. (This part works great) 2) "GO" button is pressed. (Works) 3) Decision DO I have to move CW or CCW. <Works with question> 4) Move until new position is reached. 5) Turn off motor...
by Bobw
Sat Feb 05, 2011 2:18 am
Forum: Flowcode V2 & V3
Topic: Flowcode PIC Student ver4 and Hi TECH
Replies: 13
Views: 12968

Re: Flowcode PIC Student ver4 and Hi TECH

WOW... I didn't expect you to actually write something. That solved a major head ache and saved me a pin on the PIC. Now I have room to put the 3 switches on their own pins. Did notice on the simulator that it shows PIN 18 (RA1) as the input when it is actually PIN 17 (RA0). With the exception of th...
by Bobw
Fri Feb 04, 2011 11:29 pm
Forum: Flowcode V2 & V3
Topic: Flowcode PIC Student ver4 and Hi TECH
Replies: 13
Views: 12968

Re: Flowcode PIC Student ver4 and Hi TECH

Thanks for the tip. I changed the header to reflect it in lower case. Going to hang on to this one to build other programs from. Is it possible to make an ACD input (POT) display a negative number? I need from -90 to +450 with out a bunch of table look up. If not, may just use push buttons to move t...
by Bobw
Fri Feb 04, 2011 11:10 pm
Forum: Flowcode V2 & V3
Topic: Flowcode PIC Student ver4 and Hi TECH
Replies: 13
Views: 12968

Re: Flowcode PIC Student ver4 and Hi TECH

The last FCF file compiled, loaded and ran with no problems, even the LED, glad I had a few laying around. Will have to look at the "C" file and see what is different on this one and the first one I tried. I have written programs to the 16F88 to display ADC values, tell me which switch I have presse...
by Bobw
Fri Feb 04, 2011 5:31 pm
Forum: Flowcode V2 & V3
Topic: Flowcode PIC Student ver4 and Hi TECH
Replies: 13
Views: 12968

Re: Flowcode PIC Student ver4 and Hi TECH

I downloaded the patch, now on VER 4.3.7.63. The program will compile with out error and attempt to program the PIC (successfully) but the program does not run? SO far only thing I have been able to load into this PIC is the HEX file you sent me. Id stick with the 16F88 but the 16F1827 is faster has...
by Bobw
Fri Feb 04, 2011 5:08 pm
Forum: Flowcode V2 & V3
Topic: Flowcode PIC Student ver4 and Hi TECH
Replies: 13
Views: 12968

Re: Flowcode PIC Student ver4 and Hi TECH

The HEX file you provided did program into the PIC and run. The flow code you provided still gives me errors? I am using ver 4.2.3.58 Downloading the 4.2-4.3 patch and will try again. Launching the compiler... C:\Program Files\HI-TECH Software\PICC\9.80\bin\picc.exe --CHIP=16F1827 -N48 Xx1827HELLO.c...
by Bobw
Fri Feb 04, 2011 2:39 pm
Forum: Flowcode V2 & V3
Topic: Flowcode PIC Student ver4 and Hi TECH
Replies: 13
Views: 12968

Re: Flowcode PIC Student ver4 and Hi TECH

Ben, Still no go. I also noticed that when I try to click on the CHIP/CONFIGURE to make sure the watchdog is OFF it does not list the 16F1827 there?? I do not even see it in the list, but it was in the list when I selected new project. Launching the compiler... C:\Program Files\HI-TECH Software\PICC...
by Bobw
Fri Feb 04, 2011 2:07 pm
Forum: Flowcode V2 & V3
Topic: Flowcode PIC Student ver4 and Hi TECH
Replies: 13
Views: 12968

Flowcode PIC Student ver4 and Hi TECH

I just upgraded to ver4, I have read the post about adding the HI TECH C Compiler and when I try to compile a simple "HELLO MOM" to a PIC16F1827 I get the following errors? I have been able to compile and program with the PICKIT3 to a 16F88 with no problems. I know this belongs in the 4.0 forum, but...
by Bobw
Mon Jan 31, 2011 4:15 pm
Forum: C and ASM Programming
Topic: Quadrature Encoder (mouse)
Replies: 2
Views: 4298

Re: Quadrature Encoder (mouse)

Ben; And I thought getting the LCD to display "Hello World" was hard. I have read most of the post on here with regards to Encoders. Wish I could use an ACD input due to I understand it and simpler to implement, but it is not absolute enough for rotation. Without a way to simulate in Flowcode, Will ...
by Bobw
Mon Jan 31, 2011 3:03 pm
Forum: C and ASM Programming
Topic: Quadrature Encoder (mouse)
Replies: 2
Views: 4298

Quadrature Encoder (mouse)

I am planning on using an encoder from a mouse for a project I am working on. I have Flowcode PIC4 on order. I know there is not a component for this in Flowcode, (hope they add one). The final project will be on a PIC16F1827, but I am using a PIC16F88 to play with for now. Does anyone have a "C" sa...
by Bobw
Mon Jan 31, 2011 2:09 am
Forum: General / Misc
Topic: Flowcode PIC Student
Replies: 1
Views: 6917

Re: Flowcode PIC Student

Guess I will answer my own question.
Found the student edition at http://www.microchipdirect.com/productd ... 0#sw500080 for $64.00
Best price I could find.
by Bobw
Sun Jan 30, 2011 10:20 pm
Forum: General / Misc
Topic: Flowcode PIC Student
Replies: 1
Views: 6917

Flowcode PIC Student

I am looking at a distributor here in the USA for Version 4. Of the several I have found, the price ranges anywhere from $80 to over $150. While I do not mind paying for the software, I would like the best price. Anyone have suggestions on where to look?

Bob
by Bobw
Sun Jan 30, 2011 4:36 pm
Forum: Flowcode V2 & V3
Topic: Simple project does not run
Replies: 5
Views: 5318

Re: Simple project does not run

I went back and looked at my original that did not work and saw my mistake. I should post this one under some of the demo programs. I have seen many post with people looking for the proper code for various LCDs. It kind of has the added bonus of letting you actually see the character on the display....
by Bobw
Sun Jan 30, 2011 4:15 pm
Forum: Flowcode V2 & V3
Topic: Simple project does not run
Replies: 5
Views: 5318

Re: Simple project does not run

Wrote a new flowcode for it and it runs fine??????? Code is ASCII 223
Go figure.
Bob
by Bobw
Sun Jan 30, 2011 3:22 pm
Forum: Flowcode V2 & V3
Topic: Simple project does not run
Replies: 5
Views: 5318

Re: Simple project does not run

Jan, I have the data sheet for the display. Code should be 11111101 (not sure the ASCII value). I have written other sample programs that work fine, except this one. I played around with one that does work trying different ASCII values but the results were not what was expected. I know I am missing ...
by Bobw
Sun Jan 30, 2011 2:39 pm
Forum: Flowcode V2 & V3
Topic: Simple project does not run
Replies: 5
Views: 5318

Simple project does not run

I was trying to display a degree symbol on my LCD, since the Ascii codes did not work I wrote a small program to run through the entire library so I could see what code it wants. It runs fine on the simulator, compiles and loads into the 16F88 but does not run. What did I miss?
degree.fcf
(5.5 KiB) Downloaded 350 times
Bob
by Bobw
Sun Jan 30, 2011 2:13 pm
Forum: Components (Other)
Topic: Quadrature Encoder
Replies: 9
Views: 14402

Re: Quadrature Encoder

I thought about some of those options. Problem comes from determining the direction (left or right).
I am looking at purchasing flowcode 4 soon as I find the cheapest supplier. Would be nice if they add a optical encoder in future releases. The project I am working on requires 2 of them.
by Bobw
Sun Jan 30, 2011 1:38 am
Forum: Components (Other)
Topic: Quadrature Encoder
Replies: 9
Views: 14402

Quadrature Encoder

I have read just about every post on here dealing with Quadrature Encoders. I do not see such a device in the flowcode arsenal. Is there a way to add one and use it in the simulator? Right now all I want to do is Count (increase) or decrement the pulse count and display it on the LCD. I will manuall...
by Bobw
Sat Jan 29, 2011 8:39 pm
Forum: Flowcode V2 & V3
Topic: PIC16F1827 FCD FILE
Replies: 12
Views: 10251

Re: PIC16F1827 FCD FILE

Ok solved my own problem. Using the Oscillator selection for internal and the speed as listed under VIEW, PROJECTS OPTIONS, does NOT properly set the internal oscillator. Had to use osccon = 0x70; at the beginning of the code. Wish they gave you more than 16 Icons to use in the demo version. Just ne...