Hello everybody,
I tested UART (RS232) on 12F675, 12F1822, 12F1840 and it doesn't work. I attach the flowcharts below. I also tested on 16F877A and it works. Please help me.
Thanks !
UART (RS232)
-
- Posts: 47
- http://meble-kuchenne.info.pl
- Joined: Sat Jul 10, 2021 2:43 pm
- Has thanked: 12 times
- Been thanked: 6 times
-
- Matrix Staff
- Posts: 1916
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 621 times
- Been thanked: 644 times
Re: UART (RS232)
Hi samtin.
Before creating any project, always run a 1-second flash tester on your hardware.
It will save you a lot of time, since if the pin is on for more or less than expected time then Configuration settings do not match the hardware.
What is the measured on/off time?
for the 12F1840 for example, can you confirm if you are using a crystal with the two caps connected to each crystal leg and GND?
Before creating any project, always run a 1-second flash tester on your hardware.
It will save you a lot of time, since if the pin is on for more or less than expected time then Configuration settings do not match the hardware.
What is the measured on/off time?
for the 12F1840 for example, can you confirm if you are using a crystal with the two caps connected to each crystal leg and GND?
Martin
Re: UART (RS232)
I greet you, Mr. Martin,
I'm glad you answer me, I'll try what you suggest. I must say that the tests are done with another application that proved the operation of the same flowchart on 16F877A. Also at: https://www.matrixtsl.com/mmforums/view ... 41#p102441
UART has been proven to work.
I'm glad you answer me, I'll try what you suggest. I must say that the tests are done with another application that proved the operation of the same flowchart on 16F877A. Also at: https://www.matrixtsl.com/mmforums/view ... 41#p102441
UART has been proven to work.
-
- Matrix Staff
- Posts: 1916
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 621 times
- Been thanked: 644 times
Re: UART (RS232)
If you place a delay of 1 second then the duration is one second.
If it's different, then there is a mismatch.
It's better to use hardware than to rely on simulation.
In the past, I have had code not working on Proteus, but working fine on hardware and vice versa.
As there is a x4 speed difference then could be PLL is not being accounted for?
If it's different, then there is a mismatch.
It's better to use hardware than to rely on simulation.
In the past, I have had code not working on Proteus, but working fine on hardware and vice versa.
As there is a x4 speed difference then could be PLL is not being accounted for?
Martin
Re: UART (RS232)
Hi Martin! Hello everybody!
PIC12F1822 does not work, displays a single character, I do not know what to do next. The same flowchart for 12F1822 works on PIC16F688, on PIC16F886. I did the tests on a PIC development board. The hex file taken from Martin for 12F1822 works, I mentioned the address above.
Please help me.
PIC12F1822 does not work, displays a single character, I do not know what to do next. The same flowchart for 12F1822 works on PIC16F688, on PIC16F886. I did the tests on a PIC development board. The hex file taken from Martin for 12F1822 works, I mentioned the address above.
Please help me.
-
- Matrix Staff
- Posts: 1916
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 621 times
- Been thanked: 644 times
Re: UART (RS232)
If the flowchart worked on a different device then it suggests the code is correct.
So either the project settings are not correct.
What was the result of the 1 second flasher on your hardware?
Is the pulse width 1 second?
If so Send a Upper case U and measure the pulse width.
So either the project settings are not correct.
What was the result of the 1 second flasher on your hardware?
Is the pulse width 1 second?
If so Send a Upper case U and measure the pulse width.
Martin
Re: UART (RS232)
Hi Martin, hello everyone,
Thank you Mr. Martin very, very much for the support, the 1s test helped me a lot, indeed the settings were not done correctly, after I made the corrections it works on the development board.
Thank you very much !

Thank you Mr. Martin very, very much for the support, the 1s test helped me a lot, indeed the settings were not done correctly, after I made the corrections it works on the development board.
Thank you very much !




