Pic16F1618 UART Remap
Moderator: Benj
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Pic16F1618 UART Remap
Hi Guys
I'm trying to get the RS232 TX to send data on the PIC16F1618 SSOP 20 pin but can't seem to get it right. If I do a simulation it sends the data out on the coms port but when I try it in the chip nothing not sure what I'm doing wrong.
I'm trying to get the RS232 TX to send data on the PIC16F1618 SSOP 20 pin but can't seem to get it right. If I do a simulation it sends the data out on the coms port but when I try it in the chip nothing not sure what I'm doing wrong.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Pic16F1618 UART Remap
Hello,
In your configuration settings you have Low Voltage Programming Enabled - Please change this to Disabled.
You wight also want to change the PPSLOCK item so that it is Enabled.
The Watchdog timer is also enabled, I would maybe disable this until you're happy things are working ok.
Other then that maybe try a standard 1 second flasher test to confirm the chip is running at the specified speed.
In your configuration settings you have Low Voltage Programming Enabled - Please change this to Disabled.
You wight also want to change the PPSLOCK item so that it is Enabled.
The Watchdog timer is also enabled, I would maybe disable this until you're happy things are working ok.
Other then that maybe try a standard 1 second flasher test to confirm the chip is running at the specified speed.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: Pic16F1618 UART Remap
Hi Ben
Thanks for the reply I did the 1s puls when I set the clock speed to 32Mhz internal, that all seemed to work. I have also changed the settings as you suggested but still nothing. Is there anything else I can try.
Thanks for the reply I did the 1s puls when I set the clock speed to 32Mhz internal, that all seemed to work. I have also changed the settings as you suggested but still nothing. Is there anything else I can try.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Pic16F1618 UART Remap
If the 1sec flash test is ok,
Have you tried moving send string function to before the decision branch to eliminate connection issues?
Do you have a scope or logic analyser?
If no then this is what I do if terminal not displaying correct text.
Have you tried moving send string function to before the decision branch to eliminate connection issues?
Do you have a scope or logic analyser?
If no then this is what I do if terminal not displaying correct text.
Martin
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Pic16F1618 UART Remap
I have moved this topic from the "Tips and Tricks" section as that is meant for sharing your knowledge
Not for starting off with asking questions.
Another thing I have thought of.
Can you measure the voltage on the TX output whilst sending data and not sending data?
Not for starting off with asking questions.
Another thing I have thought of.
Can you measure the voltage on the TX output whilst sending data and not sending data?
Martin
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: Pic16F1618 UART Remap
Hi Martin
I have tried putting the send string straight after the UART initialize in a loop with a 1-second delay but still nothing. I have also hooked the scope up but can't measure any voltage only noise 250mv. and even hooked up a USB to RS232 converter that does not even give me gibberish. I dont know where to go from here. The pin I'm using is RA2 I have also tried RB7, also switched RA2 high low high low to see if it was working.
I have tried putting the send string straight after the UART initialize in a loop with a 1-second delay but still nothing. I have also hooked the scope up but can't measure any voltage only noise 250mv. and even hooked up a USB to RS232 converter that does not even give me gibberish. I dont know where to go from here. The pin I'm using is RA2 I have also tried RB7, also switched RA2 high low high low to see if it was working.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Pic16F1618 UART Remap
Hi Brian,
Just wanted to make sure as much is covered as possible.
So long as you have checked you are using the latest version (8.2.1.14), sounds like you have gone as far as you can go.
This possibly requires a fix from Martix.
Just wanted to make sure as much is covered as possible.
So long as you have checked you are using the latest version (8.2.1.14), sounds like you have gone as far as you can go.
This possibly requires a fix from Martix.
Martin
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: Pic16F1618 UART Remap
Thanks Martin
I think there is a problem with the PIC16F1618 component as it won't work in software mode as well i get the followin error
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_UART.c:
206: #error "Software UART Baud Rate Not Available At This Clock Speed"
(103) #error: "Software UART Baud Rate Not Available At This Clock Speed" ^
(908) exit status = 1
(908) exit status = 1
Have changed the from 32Mhz to 4Mhz still same problem
I think there is a problem with the PIC16F1618 component as it won't work in software mode as well i get the followin error
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_UART.c:
206: #error "Software UART Baud Rate Not Available At This Clock Speed"
(103) #error: "Software UART Baud Rate Not Available At This Clock Speed" ^
(908) exit status = 1
(908) exit status = 1
Have changed the from 32Mhz to 4Mhz still same problem
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Pic16F1618 UART Remap
Woops, Thought you was using V8, sorry.jollybv wrote:C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_UART.c:
Software mode has limitations and is not as good as hardware mode.jollybv wrote:206: #error "Software UART Baud Rate Not Available At This Clock Speed"
I don't believe that is a bug as 115200 in software mode is too fast, 38400 is the maximum you can have.
Martin
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: Pic16F1618 UART Remap
Hi Martin
Thanks again I have got it to work at 9600 in software but I will need to resolve the Chanel 1 with Matrix as the board I'm talking to runs at 115200
Thanks again I have got it to work at 9600 in software but I will need to resolve the Chanel 1 with Matrix as the board I'm talking to runs at 115200
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Pic16F1618 UART Remap
No problem,
I have moved topic to the V7 bugs section.
Out of curiosity,
Have you got the latest V7 update posted here?
I have moved topic to the V7 bugs section.
Out of curiosity,
Have you got the latest V7 update posted here?
Martin
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: Pic16F1618 UART Remap
Hi Martin
I did not have the latest updates have loaded, will give it a try a bit later and let you know
I did not have the latest updates have loaded, will give it a try a bit later and let you know
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: Pic16F1618 UART Remap
Hi Martin
I have tried using the channel 1 UART after updating but still, does not work so I will need to wait for the flowcode guys to help
I have tried using the channel 1 UART after updating but still, does not work so I will need to wait for the flowcode guys to help
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: Pic16F1618 UART Remap
Hi, Guys
Does anyone know how to solve the UART problem I have on The PIC16F1618 as I have tried everything and nothing works the only thing I can get to work is software UART at 9600
Does anyone know how to solve the UART problem I have on The PIC16F1618 as I have tried everything and nothing works the only thing I can get to work is software UART at 9600
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Pic16F1618 UART Remap
Hello,
Can you send us your latest test program and I'll try and investigate for you.
Can you send us your latest test program and I'll try and investigate for you.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Pic16F1618 UART Remap
Hello,
When I load your project file into FC7 both the remap properties are empty.
Have you assigned these values in your project?
When I load your project file into FC7 both the remap properties are empty.
Have you assigned these values in your project?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: Pic16F1618 UART Remap
Hi Ben
Yes I have but as soon as I select Channel 1 the Uart does not work anymore at any speed i can only use the software at 9600.
Yes I have but as soon as I select Channel 1 the Uart does not work anymore at any speed i can only use the software at 9600.
- Attachments
-
- Uart 1.PNG
- (18.5 KiB) Downloaded 2076 times