Search found 225 matches

by Ron
Wed Nov 11, 2009 4:01 pm
Forum: Flowcode V2 & V3
Topic: 32 bit unsigned VAR
Replies: 7
Views: 5412

32 bit unsigned VAR

Hi, Is there a way to define and use a 32 bit unsigned VAR to count 10ms ticks in TMR0 macro? I looked in the latest BoostC manual and 32 bit unsigned is supported. I am not sure if it is supported in the BoostC version used by Flowcode or if I can even do it, say in a "C" block. I want to use this ...
by Ron
Fri Nov 06, 2009 5:11 pm
Forum: Flowcode V2 & V3
Topic: TMR0 Preloading Count
Replies: 11
Views: 13017

Re: TMR0 Preloading Count

Hi, It sounds like Timer 2 would be a better solution for me. I am using both 16F886/887 and 18F4620/2620 chips in my project, all running at 20MHz. I eventually want to get the 18F running at 40Mhz. I would like to experiment with this. Can someone provide me with the required code to do it? Since ...
by Ron
Fri Nov 06, 2009 12:20 am
Forum: Flowcode V2 & V3
Topic: TMR0 Preloading Count
Replies: 11
Views: 13017

Re: TMR0 Preloading Count

Hi, Thank you for the information. I am having a problem in that tmr0 = 6; does not compile in my project. I have compiled it in your project fine. Any ideas as to why? I even copied your block into my project and it fails to compile. E:\Back Up Items\Step By Step\Flowcode Projects\18F 5 SEQ PAUSE R...
by Ron
Thu Nov 05, 2009 5:37 pm
Forum: Flowcode V2 & V3
Topic: TMR0 Preloading Count
Replies: 11
Views: 13017

TMR0 Preloading Count

I found web page that describes a way to prelaod a value into the TMR0 counter so that it does not count 0 to 255 but rather from the "preloaded" value to 255. 20MHz, prescale 8 (2441.41Hz) with preload of 6 give me prefect 10ms multiplier when looped, based on their spreadsheet. I want to count tim...
by Ron
Fri Oct 23, 2009 12:19 am
Forum: Flowcode V2 & V3
Topic: Component Macros that disable INT
Replies: 3
Views: 3009

Re: Component Macros that disable INT

Hello Ben, I have been trying to get TMR0 to work accurately with very little luck. I believe I have traced it to EEPROM READs. I read 15 eeprom addresses with every logic solve of the project. My project has no loops that tie up the program for extended period of time (other than the eeprom read lo...
by Ron
Wed Oct 21, 2009 1:43 pm
Forum: Flowcode V2 & V3
Topic: TMR0
Replies: 15
Views: 8238

Re: TMR0

Hi,

Guess I need to go back to 3rd grade after I get some sleep.

Thank you,

Ron
by Ron
Wed Oct 21, 2009 3:02 am
Forum: Flowcode V2 & V3
Topic: TMR0
Replies: 15
Views: 8238

Re: TMR0

Hi, I need help, I cannot get the expected results using TMR0 INT. Either I do not understand how it works, or I am not implementing it correctly, or both. Please correct me as I explain what I think I know. I want to count 10ms time periods but need to use 20MHz for now (waiting on 40MHz crystals)....
by Ron
Fri Oct 16, 2009 12:46 pm
Forum: Flowcode V2 & V3
Topic: TMR0
Replies: 15
Views: 8238

Re: TMR0

Hi Guys, I have the TMR0 almost working. I am using the TMR0 to count out a "pause" command. 18F4620 running at 20MHz, prescale of 8 Flowcode tells me I am running at 2441.41 . I thought the formula was 20000 / 8 = 2500 ? 1 / 2500 = .0004, do what Steve suggested and do this INT for 25 times, then s...
by Ron
Thu Oct 15, 2009 12:59 pm
Forum: Flowcode V2 & V3
Topic: TMR0
Replies: 15
Views: 8238

Re: TMR0

Hi Ben, When the VAR that I am using to count "10ms increments" rolls over to zero I need to account for this. I expect the TMR0 INT to trigger anywhere from 1 - 3 times (depending on how much/which logic solves) per scan, I need to read up to 15 non consecutive eeprom addresses on some logic scans....
by Ron
Thu Oct 15, 2009 12:48 am
Forum: Flowcode V2 & V3
Topic: TMR0
Replies: 15
Views: 8238

Re: TMR0

Hi,

I will be Incrementing a VAR using TMR0, when the VAR reaches 255 and then Increments again will it roll over to zero or do I have to push a 0 into the var1?

Thank you,

Ron
by Ron
Wed Oct 14, 2009 3:34 pm
Forum: Flowcode V2 & V3
Topic: TMR0
Replies: 15
Views: 8238

Re: TMR0

Hi, Thank you Steve and Ben. Quick question..... x2 How long does it take to process Var = (Var + 1) + (return time from the TMR0 routine) to the main application. 40MHz 18F 20MHz 16F At prescalers of 16 (18F) and 8 (16F) I hit the 10ms exactly. I am trying to determine at 400us TMR0 counts how much...
by Ron
Wed Oct 14, 2009 12:50 am
Forum: Flowcode V2 & V3
Topic: TMR0
Replies: 15
Views: 8238

Re: TMR0

Hi Ben, I appreciate all the help..... Now for more questions regarding TMR0. I looked at the tutorial description and saw that clock speed/ prescaler = Hz, but the math 3,276,800Hz/128 = 25600 (not 25). Why does the 600 go away? I want to run at 40MHz on an 18F and have 10ms counts. How can I achie...
by Ron
Mon Oct 12, 2009 1:20 am
Forum: Flowcode V2 & V3
Topic: TMR0
Replies: 15
Views: 8238

TMR0

Hi, I want to use TMR0 to count in 10ms increments. It seems to me that when I get to a section of my code I will read the current value in the TMR0_Count_Var and capture it. If my code must wait a minimum of 10ms before continuing and by counting in 10ms increments with TMR0 I may not get the full ...
by Ron
Mon Oct 12, 2009 1:09 am
Forum: Flowcode V2 & V3
Topic: Component Macros that disable INT
Replies: 3
Views: 3009

Component Macros that disable INT

Hi, Can you tell me what component macros disable Interrupts please. I was trying to go through the "C" code for my program and it looks like writing to eeprom disables INT. I also use I2C, SPI and RS232 in my programs as well. I did not find anything else that disabled the INT in my program. It wou...
by Ron
Wed Oct 07, 2009 1:46 am
Forum: Components (Comms)
Topic: V3 Changing Baud Rates
Replies: 3
Views: 8306

Re: V3 Changing Baud Rates

Hi Ben, These worked..... i set the component to 9600, I needed BRG16 I Added a "C" block with the following, which worked, I confirmed the baud rate using a serial port monitor. clear_bit(txsta, SYNC); set_bit(txsta, BRGH); set_bit(baudcon, BRG16); spbrg = 42; set_bit(rcsta, SPEN); // turn on seria...
by Ron
Mon Oct 05, 2009 3:30 pm
Forum: Components (Comms)
Topic: V3 Changing Baud Rates
Replies: 3
Views: 8306

V3 Changing Baud Rates

Hello, I have tried to set up the baud rate register/bits with the following in an attempt to over ride the RS232 componenet macro baud rate. Ben had offered me this in a past post (18F4620, 20MHz, SYNC = 0, BRGH = 1, BRG16 = 1, SPBRG = 42, 115K2 Baud Rate). clear_bit(txsta, SYNC); set_bit(txsta, BR...
by Ron
Sun Sep 27, 2009 3:54 am
Forum: Flowcode V2 & V3
Topic: CAN on board
Replies: 4
Views: 3334

Re: CAN on board

Hi Ben,

Can these same changes be made to V3?

Thank you,

Ron
by Ron
Thu Sep 24, 2009 6:47 pm
Forum: Flowcode V2 & V3
Topic: CAN on board
Replies: 4
Views: 3334

CAN on board

Hello, Will Flowcode be supporting CAN that is built on board many of the newer PICs? 18F4680/18F2680 are the version I am looking at using. I want to be able to communicate using an 18F4680 as the master and 18F2680 as slaves. I am using V3 and hope to upgrade someday to V4 of Flowocde. Thank you, ...
by Ron
Fri Sep 18, 2009 2:14 pm
Forum: General Programming
Topic: MCLR Reset - Please Explain
Replies: 1
Views: 2468

MCLR Reset - Please Explain

Hi, I have written a simple program that reads an eeprom address many times. I need to use 2 different loop vars in order to count high enough. I have a block at the top if the flowchart to init the first loop var (Loop_1 type INT) to it's proper value of -30000. With each loop I INC Loop_1 until I ...
by Ron
Sat Sep 12, 2009 12:08 pm
Forum: Flowcode V2 & V3
Topic: Pins defined as Analog AND Digital
Replies: 1
Views: 2374

Pins defined as Analog AND Digital

Hi, I want to "define" 8 pins for 18F4620 as both analog and digital in different sections of my program. A variable downloaded on power up via rs232 will determine which logic will be solved for each pin, digital or analog. If a pin is defined by RS232 as digital the analog logic will never solve, ...
by Ron
Sun Sep 06, 2009 11:44 am
Forum: Flowcode V2 & V3
Topic: Timing Issue
Replies: 2
Views: 2821

Re: Timing Issue

Hi,

I changed the program for a 16F887 and it works properly.

So my guess is it is the config bits, any ideas????

Thank you,

Ron
by Ron
Sun Sep 06, 2009 2:16 am
Forum: Flowcode V2 & V3
Topic: Timing Issue
Replies: 2
Views: 2821

Timing Issue

Hello, I had a working program and then could not locate the latest source code, somehow must have deleted it. I went to older back up that should work and RS232 would not connect. So I went back to basics with 2 versions of the same program. 18F4620, 20000000 EXT Program 1 1 -> RA0 LED comes on whe...
by Ron
Wed Aug 12, 2009 6:53 pm
Forum: Components (Comms)
Topic: Baud Rate changes in project
Replies: 2
Views: 7571

Re: Baud Rate changes in project

Hi Ben, If I have only one RS232 port on my board and a toggle switch tied to input telling me which device is connected to my rs232 port can i have different "C" code in different loops of code that will allow my program to operate a single RS232 at different baud rates. Example: RA3 HIGH means MP3...
by Ron
Wed Aug 12, 2009 4:22 pm
Forum: Components (Comms)
Topic: Baud Rate changes in project
Replies: 2
Views: 7571

Baud Rate changes in project

Hi, I was wondeirng if I can change the baud rate to different rates in a flowcode project. Example: Flowcode V3 There is am MP3 player that I can control via RS232, it must work at 2400 baud. I have a few RS232 boards that run at 115K2 baud. Can I put the necessary "C" code in the MP3 macro, place ...
by Ron
Tue Aug 11, 2009 7:46 pm
Forum: General / Misc
Topic: splitting 1 byte into 2 bytes
Replies: 2
Views: 2921

Re: splitting 1 byte into 2 bytes

Hi,

yes.... Boy, did I mess that one up......

10 bits.... yep...

Good thing these guys believe in the old saying.... Give me the answer I need, not for what I actually asked...

Thanks,

Ron