PIC16F1618 uart speed

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jollybv
Posts: 125
http://meble-kuchenne.info.pl
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

PIC16F1618 uart speed

Post by jollybv »

Hi Guys

I'm not sure why but when I try compile I get the below error "Software UART Baud Rate Not Available At This Clock Speed" which confuses me as I have set the clock speed to 32 Mhz and I'm trying to set the uart baud rate to 115200

Code: Select all

Target folder: C:\Users\brian\Dropbox\Designs and software\Boards-21-04-14\Boards In the market\Min1 Keypad Programs
Source name:   C:\Users\brian\Dropbox\Designs and software\Boards-21-04-14\Boards In the market\Min1 Keypad Programs\Mini_6_keypad.fcfx
Title:         
Description:   
Device:        PIC.16F.16F1618
Generated by:  Flowcode v9.2.0.33
Date:          Saturday, October 29, 2022 09:43:27
Users:         1
Registered to: jollybv (54349151)
Licence key: 1WPA8J
https://www.flowcode.co.uk
Using <PICkit3_ 3.3v> user settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PIC\batch\pic_xc8_comp.bat  "C:\Program Files (x86)\Flowcode\Common\Compilers\picv2\" 16F1618 "C:\Users\brian\Dropbox\Designs and software\Boards-21-04-14\Boards In the market\Min1 Keypad Programs\" "Mini_6_keypad"

C:\Users\brian\Dropbox\Designs and software\Boards-21-04-14\Boards In the market\Min1 Keypad Programs>REM CRC: 90CF26913586BBA787FE92D553771933222DCF72B25FEB4608E17FBD060500D8A6D7AF8357042D9E8B5C2E833010A32BE2214988CBC1BB00301ECF6745983589FE0D8D4660AC0314F98C28BCA92AF856EFD1DB5B777140BC4D00059D79589982F2C26BF78BFC32C650CACCEB0B5A8E521002EAF3D15174CD20633AD186EC562DBEEF6112EA5AA5CF5041CCE14E8D252BC416ECB8EC7761E4FD518969900F56C6C8F36CE7BEFFD91E73F563CBE7F64B8A69F01B3F3C0F45102C3050DA273BE4EE1BF2A9420263CDAEEC22F549213B2E20A6A0704CBC762DED 

C:\Users\brian\Dropbox\Designs and software\Boards-21-04-14\Boards In the market\Min1 Keypad Programs>REM REVISION: 1.0 

C:\Users\brian\Dropbox\Designs and software\Boards-21-04-14\Boards In the market\Min1 Keypad Programs>REM GUID: 50CB4B58-ED9C-4591-8D65-A87DE810E8CC 

C:\Users\brian\Dropbox\Designs and software\Boards-21-04-14\Boards In the market\Min1 Keypad Programs>REM DATE: 29\03\2021 

C:\Users\brian\Dropbox\Designs and software\Boards-21-04-14\Boards In the market\Min1 Keypad Programs>REM DIR: FCD\PIC\batch\pic_xc8_comp.bat 

C:\Users\brian\Dropbox\Designs and software\Boards-21-04-14\Boards In the market\Min1 Keypad Programs>"C:\Program Files (x86)\Flowcode\Common\Compilers\picv2\bin\xc8.exe" --chip=16F1618  "Mini_6_keypad.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32 
C:\Program Files (x86)\Flowcode\Common\Compilers\picv2\pic\bin\picc --chip=16F1618 Mini_6_keypad.c --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32
Microchip MPLAB XC8 C Compiler V2.10
Build date: Jul 30 2019
Part Support Version: 2.10
Copyright (C) 2019 Microchip Technology Inc.
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\PIC\PIC_CAL_UART.c:
   330:			#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

Error returned from [xc8.exe]

C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PIC\batch\pic_xc8_comp.bat reported error code 0x1



Autoclose turned off


FINISHED
Mini_6_keypad.fcfx
(28.97 KiB) Downloaded 34 times

medelec35
Matrix Staff
Posts: 1463
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 514 times
Been thanked: 473 times

Re: PIC16F1618 uart speed

Post by medelec35 »

Hi Brian.
It's because you have selected UART Software mode for channel.
As it's bit-banged, it will not run at high speeds well at all.
The error is stating that the software mode required speed cannot be achieved.
UART Software mode should be the very last resort at any speed. as it is not reliable (especially if also using interrupts).
To resolve this you will need to change Channel from Software to Channel 1.
For future reference:
If there is a pin you need to use for UART that is not available e.g. A.1, then use UART timer instead of software mode.

I have edited your post to place the compiler messages within code tags.
Martin

Post Reply