worked fine!
Thanks Again Stefan, i hope one day i can "payback" this to all you guys.
Search found 97 matches
- Wed Feb 10, 2021 11:34 am
- Forum: Flowcode V7
- Topic: Low Baud Rate speeds- How to set up using C code
- Replies: 15
- Views: 556
- Wed Feb 10, 2021 11:09 am
- Forum: Flowcode V7
- Topic: Low Baud Rate speeds- How to set up using C code
- Replies: 15
- Views: 556
Re: Low Baud Rate speeds- How to set up using C code
Hi Martin and Stefanmedelec35 wrote: ↑Tue Feb 09, 2021 8:36 pmHi George,
How about?Code: Select all
BAUDCONbits.BRG16=0;
no luck with this code, i am getting error on C code again.

- Tue Feb 09, 2021 10:52 am
- Forum: Flowcode V7
- Topic: Low Baud Rate speeds- How to set up using C code
- Replies: 15
- Views: 556
Re: Low Baud Rate speeds- How to set up using C code
Hi Stafan, thank you once again for helping me out.
I got this error after compiling with the code you provided.
I am looking the datasheet so i can familiarise myself and learn about it. Regards
George
I got this error after compiling with the code you provided.
I am looking the datasheet so i can familiarise myself and learn about it. Regards
George
- Tue Feb 09, 2021 9:58 am
- Forum: Flowcode V7
- Topic: Low Baud Rate speeds- How to set up using C code
- Replies: 15
- Views: 556
Re: Low Baud Rate speeds- How to set up using C code
Hi again, In my previous posts, with the help of Stefan, i manage to set the baud rate at 1200 on a 18F4680 device. I am trying to set the same baud rate value on a 16F88 device but i am getting an error for the C code. Should i use any other code than this i used for 18F device? Thanks George
- Fri Dec 18, 2020 8:22 pm
- Forum: Flowcode V7
- Topic: Low Baud Rate speeds- How to set up using C code
- Replies: 15
- Views: 556
Re: Low Baud Rate speeds- How to set up using C code
Thanks to Stefan i manage to have the program working at 1200 baudrate.
The trick was to change( use grater than 1) the timeout value from UART Receive component.
I wish you all be well and health.
Regards
George
The trick was to change( use grater than 1) the timeout value from UART Receive component.
I wish you all be well and health.
Regards
George
- Fri Dec 18, 2020 6:03 pm
- Forum: Flowcode V7
- Topic: Low Baud Rate speeds- How to set up using C code
- Replies: 15
- Views: 556
Re: Low Baud Rate speeds- How to set up using C code
ok the compile to hex now does not returns any error. However the MCU is only sending data out(correctly at 1200 baud rate) and not receiving data .Note that i am using Rx INTerrupt to read the incoming data.
Is there anything else i have to configure to have it working ?
Thanks
George
Is there anything else i have to configure to have it working ?
Thanks
George
- Fri Dec 18, 2020 4:33 pm
- Forum: Flowcode V7
- Topic: Low Baud Rate speeds- How to set up using C code
- Replies: 15
- Views: 556
Re: Low Baud Rate speeds- How to set up using C code
Hi Stefan, Thanks for your help. I tried to add the C code (4 lines you mentioned) but i get an error(see attachment). Sim_Error.jpg I am using 19.660800 Mhz Crystal and i want to set the baud rate value at 1200. As far as i read in the manual i can only calculate the value of SPBRG. The formula i u...
- Thu Dec 17, 2020 10:10 pm
- Forum: Flowcode V7
- Topic: Low Baud Rate speeds- How to set up using C code
- Replies: 15
- Views: 556
Re: Low Baud Rate speeds- How to set up using C code
Hi, i tried to use the lower values baud rate but it is actually not working on hardware. There should be something missing in the flowcode's background..
Hopefully someone will answer to this and solve the issue.
Regards
George
Hopefully someone will answer to this and solve the issue.
Regards
George
- Thu Dec 17, 2020 9:50 pm
- Forum: Flowcode V7
- Topic: Low Baud Rate speeds- How to set up using C code
- Replies: 15
- Views: 556
Low Baud Rate speeds- How to set up using C code
Hi all! I hope you are all well. My question is (as the title says) how to set up lower baud rate speeds than 9600(flowcode default) using C code for device 18F4680. I would like to be able to use baud rate values of 1200 , 2400 and 4800. It is not very clear to me what is the way we calculate and c...
- Fri Feb 15, 2019 2:52 pm
- Forum: Flowcode V7
- Topic: Interrupt on INT0 pin - How fast an interrupt can capture external pulses
- Replies: 9
- Views: 2625
Re: Interrupt on INT0 pin - How fast an interrupt can capture external pulses
Hi George, I was a bit confused by your flowchart. The INT0 interrupt for encoder detection is RB0. So if you look at the input within RB0 call macro you will see there is an input for E0. The input should be for RB0 instead. I'm therefore surprised the encoder works at all? Hi Martin , The encoder...
- Fri Feb 15, 2019 2:47 pm
- Forum: Flowcode V7
- Topic: Interrupt on INT0 pin - How fast an interrupt can capture external pulses
- Replies: 9
- Views: 2625
Re: Interrupt on INT0 pin - How fast an interrupt can capture external pulses
Hi It seems you are runing an motor with an encoder attched. What is the max speed of the motor ? and at what speed do you start to loose to detect encoder pulses? The encoder at the moment is not attached on the motor. The encoder movement is done by hand and the rotation speed is approximately le...
- Fri Feb 15, 2019 1:20 pm
- Forum: Flowcode V7
- Topic: Interrupt on INT0 pin - How fast an interrupt can capture external pulses
- Replies: 9
- Views: 2625
Re: Interrupt on INT0 pin - How fast an interrupt can capture external pulses
Hello all, thank you for your replies.
here is the flowchart so you can see the actual code.
Just note that the crystal speed is 19.6608 Mhz and not 20Mhz as i said in my previous post.
Waiting your comments.
Best Regards
George
here is the flowchart so you can see the actual code.
Just note that the crystal speed is 19.6608 Mhz and not 20Mhz as i said in my previous post.
Waiting your comments.
Best Regards
George
- Thu Feb 14, 2019 1:40 pm
- Forum: Flowcode V7
- Topic: Interrupt on INT0 pin - How fast an interrupt can capture external pulses
- Replies: 9
- Views: 2625
Interrupt on INT0 pin - How fast an interrupt can capture external pulses
Hello all! I am using an encoder with A and B signal outputs. I also use an interrupt macro for INT0 (RB0) pin of a 18F4523 microcontroller with 20Mhz external crystal. The encoder has 250 ppr. I am wondering if there is any way of capturing the encoder's pulses faster? At the moment i rotate the en...
- Fri Dec 14, 2018 10:25 am
- Forum: Flowcode V7
- Topic: Modbus RTU RS485 - Receiving Issue
- Replies: 6
- Views: 2865
Re: Modbus RTU RS485 - Receiving Issue
Hello Benj, thank you for your reply. I am still trying to communicate with the Power Meter with no luck. The simulation in Proteus gives me correct results but in real hardware there is a problem in the reception of the Power Meter data. The attached File "Modbus_RTU" (Flowcode 7 Version) shows the...
- Tue Dec 11, 2018 11:02 am
- Forum: Flowcode V7
- Topic: Modbus RTU RS485 - Receiving Issue
- Replies: 6
- Views: 2865
Re: Modbus RTU RS485 - Receiving Issue
Hello, i manage to request the data correctly from Power Meter.
Now the issue that i am facing is regarding the receiving data using 2 stop bits.
Is there any idea how to achieve this? I am using Rx interrupt to receive the incomming data.
Thank in advance!
George
Now the issue that i am facing is regarding the receiving data using 2 stop bits.
Is there any idea how to achieve this? I am using Rx interrupt to receive the incomming data.
Thank in advance!
George
- Thu Nov 01, 2018 9:18 am
- Forum: Flowcode V7
- Topic: Modbus RTU RS485 - Receiving Issue
- Replies: 6
- Views: 2865
Re: Modbus RTU RS485 - Receiving Issue
Hello Benj, thank you for your reply. I am still confused and wondering how to receive and handle the incoming data from modbus slave. Using Modbus Poll software i managed to communicate with the slave device and get the expected data.(see pictures) The only options in flowcode for getting data thro...
- Tue Oct 30, 2018 8:02 pm
- Forum: Flowcode V7
- Topic: Modbus RTU RS485 - Receiving Issue
- Replies: 6
- Views: 2865
Modbus RTU RS485 - Receiving Issue
Hello, i hope you are all good! I have to read a power meter (Voltage - Amperes - Watts etc.) using Modbus RTU. In order to get some level of experience and understand things better, i first installed a modbus terminal software to observe the communication structure. I understand a few things and i ...
- Mon Oct 08, 2018 9:50 pm
- Forum: Electronics products
- Topic: RS485 Battery Stack and Common Ground
- Replies: 13
- Views: 7034
Re: RS485 Battery Stack and Common Ground

Is there any opinion about this circuit? Will this be working properly? Any idea?

- Mon Oct 08, 2018 11:24 am
- Forum: Electronics products
- Topic: RS485 Battery Stack and Common Ground
- Replies: 13
- Views: 7034
Re: RS485 Battery Stack and Common Ground
Hi all, Leigh thank you for your drawing. I am working this project in my mind and to be honest i can't see the reason for not connecting each microcontroller across each battery without any isolation circuitry. The ADC of the Micro will go at the positive of each battery and the ground pin of the M...
- Sun Oct 07, 2018 6:54 pm
- Forum: Electronics products
- Topic: RS485 Battery Stack and Common Ground
- Replies: 13
- Views: 7034
Re: RS485 Battery Stack and Common Ground
Hello all. Leigh, thank you very much for your help. I would be very thankful if you will draw a circuit with your suggestion. When you are saying that the new circuit inputs need to cope with higher voltage what do you mean? What i want is to measure the voltage of each cell and collect it onto my ...
- Sat Oct 06, 2018 7:29 pm
- Forum: Electronics products
- Topic: RS485 Battery Stack and Common Ground
- Replies: 13
- Views: 7034
Re: RS485 Battery Stack and Common Ground
Hello again! I did a really quick test with some draft boards that i had from a previous project. I used 1.5V batteries for my test and connected all in series. I connected the MCU boards as the attached picture shows and i powered all the boards from a single power supply 12V. Note that each board ...
- Thu Oct 04, 2018 12:07 pm
- Forum: Electronics products
- Topic: RS485 Battery Stack and Common Ground
- Replies: 13
- Views: 7034
Re: RS485 Battery Stack and Common Ground
Hi all, thank you for your time and help. What i am trying to do is a battery monitoring system. I want to monitor a few batteries which are not close each other. All batteries will be connected in series and each of them must have it's own microcontroller for the purpose of this project. I really w...
- Wed Oct 03, 2018 12:17 pm
- Forum: Electronics products
- Topic: RS485 Battery Stack and Common Ground
- Replies: 13
- Views: 7034
RS485 Battery Stack and Common Ground
Hello everyone, I an working on a project that requires several 3.7V batteries to be connected in series. I would like to use a microcontroller for each battery to monitor and to make some other adjustments as well. Each microcontroller board will be powered from it's battery which will be connected...
- Sat Jun 02, 2018 9:02 pm
- Forum: Programming Tips & Tricks
- Topic: spi 12bit digital to analog chip
- Replies: 14
- Views: 12761
Re: spi 12bit digital to analog chip
Hi QMESAR, Thank you for your reply. I understand what you mean and i will use it in case that i am going to make a parallel use of devices sharing the I2C lines. The issue that i have is that the chip that i want to use, is the MSP3421 which has not got a CS pin and therefor this is not possible at...
- Wed May 30, 2018 7:45 pm
- Forum: Programming Tips & Tricks
- Topic: spi 12bit digital to analog chip
- Replies: 14
- Views: 12761
Re: spi 12bit digital to analog chip
Hi all, I finally managed to read in full scale mode the MCP4821. I would like to use 4 devices connected to the same micro controller. Would it be possible to connect each device to separate pins ? I tried to do a program with four DAC devices connected in separate pins and the result is not the ex...