Search found 225 matches

by Ron
Sat Apr 28, 2012 2:43 pm
Forum: Components (Comms)
Topic: RS232 Component and RX Value 255
Replies: 15
Views: 16744

Re: RS232 Component and RX Value 255

Hi, I am doing RS485 using a max485 chip and the rs232 macro/component. I have a slave I/O board that has both inputs and outputs on it. I do comm every scan to this board. On my master I have 8 LEDs that I turn on and off. EX. turn on led 1 wait 100ms turn on led 2 wait 100ms turn on led 3 wait 100...
by Ron
Sun Apr 15, 2012 11:11 pm
Forum: Components (Comms)
Topic: RS232 Component and RX Value 255
Replies: 15
Views: 16744

Re: RS232 Component and RX Value 255

Hi,

If I get a buffer overflow when using the RS232 RX macro, how do I clear it?

The 18F4620 has a 2 byte RX buffer.

Thank you....
by Ron
Thu Apr 12, 2012 9:01 pm
Forum: Components (Comms)
Topic: RS232 Component and RX Value 255
Replies: 15
Views: 16744

Re: RS232 Component and RX Value 255

Hi, I have MODBUS RTU working with several slaves I have built. One of the specifications for MODBUS is that when receiving a packet you wait for 3.5 characters of silence (time). Then analyze the received packet. Right now I am using 10us delays and counting them between receiving a character. If I...
by Ron
Tue Apr 10, 2012 8:48 pm
Forum: Components (Comms)
Topic: Ethernet Macro
Replies: 1
Views: 6326

Ethernet Macro

Hi, I have been thinking of upgrading my V3. One of the main reasons is to allow me to move away from RS485 and into Ethernet world. Is there an easy way for me to do this/get Ethernet working? For RS485 it was easy as I was able to use the RS232 macro and there are many design examples for RS485 ci...
by Ron
Mon Feb 20, 2012 6:36 pm
Forum: Flowcode V2 & V3
Topic: MACRO issue???
Replies: 8
Views: 7772

Re: MACRO issue???

Hi,

Will it work with V3??

Will it work with RS232/485??

Thanks...

Ron
by Ron
Sun Feb 19, 2012 1:20 pm
Forum: Flowcode V2 & V3
Topic: Using Arrays
Replies: 7
Views: 17495

Re: Using Arrays

Hi, Benj responded with a previous question I had about arrays regarding size. Hello Ron, AVR's, PIC24's, dsPIC's and ARM devices can have arrays up to any size providing they have enough ram to complete the array. PIC16 and PIC18 devices can have a maximum array size of 256 bytes due to their arche...
by Ron
Sat Feb 18, 2012 4:45 am
Forum: General Programming
Topic: Creating 1uS delay
Replies: 1
Views: 3110

Creating 1uS delay

Hi, I want to create a 1uS delay while running at 19.6608MHz. I know I how to use delay_10us(1); and I think there is delay_100us(1);. I do not think there is a 1us delay function. How do I calculate how long an instruction takes to execute? I imagine NOP can be used so please start with this. How m...
by Ron
Sat Feb 18, 2012 4:25 am
Forum: Flowcode V2 & V3
Topic: Using Arrays
Replies: 7
Views: 17495

Using Arrays

Hi, I want to set up an array and when receiving a packet via the rs232 component macro put each received CHAR into a position in the array. In the Variable Manager window I have created a byte array called... RS485_TX_ARRAY[256] <--- is this the correct way to create the array? Once I receive a BYT...
by Ron
Fri Feb 17, 2012 10:08 pm
Forum: Flowcode V2 & V3
Topic: MACRO issue???
Replies: 8
Views: 7772

Re: MACRO issue???

Hi, I need to clarify something. My project compiles with the way I originally discussed. I am working with RS485 and am trying to communicate with a slave I/O board using MODBUS RTU (38.4K baud). I am getting many errors when I try to read the inputs say 5 - 8% errors, and get almost no errors <1% ...
by Ron
Thu Feb 16, 2012 9:42 pm
Forum: Flowcode V2 & V3
Topic: MACRO issue???
Replies: 8
Views: 7772

Re: MACRO issue???

Hi Martin,

I did this and it has not helped.

Thanks for the idea, it was worth a try.

Ron
by Ron
Tue Feb 14, 2012 1:54 pm
Forum: Flowcode V2 & V3
Topic: Debug Tools
Replies: 0
Views: 2721

Debug Tools

Hi,

I am having an issue with some code and want to be able to see the program variables update. Is there any way to use a pickit 2 with flowcode V3 as a debugging tool (maybe MPLAB also)?

Thanks....

Ron
by Ron
Mon Feb 13, 2012 6:32 pm
Forum: Flowcode V2 & V3
Topic: MACRO issue???
Replies: 8
Views: 7772

MACRO issue???

Hi, I have been working with macros. I have macro 'A' and needed a similar macro 'B' so I copied the code from Macro 'A' and placed it in the new macro 'B'. I got the error message about the local variables not being correct. The new macro 'B' had variable names such as.... macroA.first, macroA.seco...
by Ron
Tue Jan 31, 2012 5:14 am
Forum: Flowcode V2 & V3
Topic: Am I bit shifting correctly>
Replies: 6
Views: 6469

Re: Am I bit shifting correctly>

Hi JonnyW,

Thank you, I appreciate it.

Ron
by Ron
Tue Jan 10, 2012 7:55 pm
Forum: Flowcode V2 & V3
Topic: Am I bit shifting correctly>
Replies: 6
Views: 6469

Re: Am I bit shifting correctly>

Thanks Steve.....

Ron
by Ron
Tue Jan 10, 2012 2:07 am
Forum: Flowcode V2 & V3
Topic: Flowcode V3 download
Replies: 4
Views: 8288

Flowcode V3 download

Hello,

My computer has crashed and I need to download the latest version of Flowcode V3. Can you please provide me with the link so I can download it.

Thank you,

Ron
by Ron
Mon Jan 09, 2012 10:03 pm
Forum: Flowcode V2 & V3
Topic: Am I bit shifting correctly>
Replies: 6
Views: 6469

Re: Am I bit shifting correctly>

Hi,,, Few questions.... First question - am I using bit shifting correctly to get the desired results?? I did it with bit shifting as it allowed me to enter it in a single CALC block... Second question - can I enter the code you supplied as you entered it above in a CALC block?? If I cannot enter it...
by Ron
Mon Jan 09, 2012 3:48 am
Forum: Flowcode V2 & V3
Topic: Am I bit shifting correctly>
Replies: 6
Views: 6469

Am I bit shifting correctly>

Hi, I receive a BYTE via RS485. The low nibble (bits 0 - 3) are 4 digital input states. I need to separate them into 4 BYTES, each of the new bytes represents a single input. If the value in the LSB is == 1 then the input is HI, if the LSB is == 0 then the Input is LO. bit 0 of the received BYTE is ...
by Ron
Fri Oct 21, 2011 6:42 pm
Forum: Electronics products
Topic: Protecting PIC Digital Inputs
Replies: 3
Views: 7997

Protecting PIC Digital Inputs

Hi, I want to protect the digital inputs on my 18F4620. I am using a 1x3 Male header to connect my sensors. Pin 1 is the PIC PIN (Digital Input and is pulled hi to Vdd) Pin 2 is 12V Pin 3 is GND I want to be able to power sensors that run on 10vdc - 20vdc as well ad make my own sensors that run at 5...
by Ron
Mon Jul 25, 2011 2:53 am
Forum: Components (Comms)
Topic: RS232 Component and RX Value 255
Replies: 15
Views: 16744

Re: RS232 Component and RX Value 255

Hi, I changed my standard rs232 macro so that I can receive 255 as Ben shows above (my returned value is -1 so I test for RS232_INT_VAR > -1). When I receive RS232_INT_VAR now, if I want to move it into a BYTE can I just do this (since the value will never be higher than 255)? MY_BYTE_VAR = RS232_IN...
by Ron
Sun Jul 03, 2011 6:20 pm
Forum: Flowcode V2 & V3
Topic: Modbus RTU
Replies: 1
Views: 3612

Modbus RTU

Hi, I am trying to implement Modbus RTU and I need to work on the CRC routine. I did a simple test to see the difference between a CALC block and a "C" block. The project compiles but when I run a simulation the VARS I created and are incrementing in the "C" block are not counting up. What am I doin...
by Ron
Fri May 20, 2011 6:25 pm
Forum: Components (Comms)
Topic: RS232 Component and RX Value 255
Replies: 15
Views: 16744

Re: RS232 Component and RX Value 255

Hi Benj, Thank you, DAN81 also helped me get this going. There should be a library that can only have posts done by Moderators, read only to users. Things like this could be documented without all the extra replies to make it easier for us "inexperienced" users to find. Just an idea............ I am...
by Ron
Fri May 20, 2011 2:19 pm
Forum: Flowcode V2 & V3
Topic: RS485 TX Enable
Replies: 3
Views: 4382

Re: RS485 TX Enable

Hi Ben, I agree, number one makes the most sense to me. I will tie DE and NOT RE together to a PIC output pin. I am thinking the best way to do number 1 is to use a pull up resistor tied to (DE-NOT RE) on the Master and a pull down resistor on same line of all the slaves. On power up this would forc...
by Ron
Fri May 20, 2011 4:12 am
Forum: Flowcode V2 & V3
Topic: Flowcode V3 RS232 Component -> RS485 UPDATED
Replies: 15
Views: 29081

Re: Flowcode V3 RS232 Component -> RS485 UPDATED

Hi, I had asked earlier in this post how to determine if a byte is still in the TX buffer. Ben provided this line of code. while (ts_bit(txsta, TRMT) == 0); Flowcode V3 gives me this error when I compile it, any ideas on how to correct this error? :\Back Up Items\Step By Step\Flowcode Projects\18F 5...
by Ron
Fri May 20, 2011 12:27 am
Forum: Flowcode V2 & V3
Topic: RS485 TX Enable
Replies: 3
Views: 4382

RS485 TX Enable

Hi, I would like to know if the Master should enable the TX output on power up/reset and only drop it low when it expects a packet from a slave (after the Master sends slave a request/command)? OR Should the Master only enable the TX when it needs to send out a packet, drop it low to receive the res...
by Ron
Fri Apr 29, 2011 8:02 pm
Forum: Components (Comms)
Topic: RS232 Component and RX Value 255
Replies: 15
Views: 16744

Re: RS232 Component and RX Value 255

Hello Daniel,

I have V3 so change the component is what I will have to do. Has anyone ever done this? I have limited experience with "C".

Is this change to the component a huge undertaking?

Thanks,

Ron