I am thinking of using a PIC16F18854 on my working PIC16F1827 project, in order to get increased I/O . I understand that the 16F18854 is supported by GCB but if I assemble my code, as that device selected it errors
"Warning: Configuration setting not valid: OSC = INTOSC"
Also I cannot find which pin is Tx for the UART ... I assume it must be RC6 CK but is there anything special I need to do in GCB to assign this as the TX pin ?
Is my choice of the 16F18854 a reasonable one .. I chose it as I am using the 5 bit DAC.
chip 16F18854, 4
#config Osc = intOSC
Best wishes .. Ash ... I have come on leaps and bounds using GCB over the last two weeks .. it truly is a remarkable programming tool for a newbie to get to grips with.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There any many, many demonstrations for the 16f18855 which is a sister chip. And, the serial demos will show you how to use PPS to setup the serial port.
'Set the PPS of the PWM and the RS232 ports.'SetthePPSforthissolution.#startupInitPPS,85SubInitPPSUNLOCKPPSRC0PPS=0x0010'RC0->EUSART:TX; RXPPS = 0x0011 'RC1->EUSART:RX;RC3PPS=0x0017'RC3->MSSP2:SDA2; SSP2DATPPS = 0x0013 'RC3->MSSP2:SDA2;SSP2CLKPPS=0x0014'RC4->MSSP2:SCL2; RC4PPS = 0x0016 'RC4->MSSP2:SCL2;LOCKPPSEndsub#defineUSART_BAUD_RATE19200#defineUSART_TX_BLOCKING
The shown above can be generated using the PPSTool - it is fun to use. In the example about the PPS has setup RC0 and RC1 as TX and RX respectively. When you use PPSTool you can select from lots of ports. :-)
Anobium
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am thinking of using a PIC16F18854 on my working PIC16F1827 project, in order to get increased I/O . I understand that the 16F18854 is supported by GCB but if I assemble my code, as that device selected it errors
"Warning: Configuration setting not valid: OSC = INTOSC"
Also I cannot find which pin is Tx for the UART ... I assume it must be RC6 CK but is there anything special I need to do in GCB to assign this as the TX pin ?
Is my choice of the 16F18854 a reasonable one .. I chose it as I am using the 5 bit DAC.
chip 16F18854, 4
#config Osc = intOSC
Best wishes .. Ash ... I have come on leaps and bounds using GCB over the last two weeks .. it truly is a remarkable programming tool for a newbie to get to grips with.
You may find this useful.
https://sourceforge.net/p/gcbasic/discussion/projects&guides/thread/3fa399ca/
It introduces PPS and the PPSTool with a walkthrough of assigning SPI and USART on the 16f18855, yours is the same.
I see you are running at 4Mhz, just so you know you can run that device at 32Mhz.
Cheers
Chris
Last edit: Chris Roper 2018-03-22
You dont need to specify the internal oscillator source.
So, this works.
As this now generators the correct ASM - where
_RSTOSC_HFINT32
is the correct config.There any many, many demonstrations for the 16f18855 which is a
sister
chip. And, the serial demos will show you how to use PPS to setup the serial port.Welcome the the world of PPS - but, the demos show you how PPS works. Use this URL https://github.com/Anobium/Great-Cow-BASIC-Demonstration-Sources/tree/master/Vendor%20Boards/Xpress%20Evaluation%20Board then search the page for
serial
. Demo #20 shows on line 67... 80.The shown above can be generated using the PPSTool - it is fun to use. In the example about the PPS has setup RC0 and RC1 as TX and RX respectively. When you use PPSTool you can select from lots of ports. :-)
Anobium
Thanks for the prompt replies everyone .. I see it all cleraly now. That PPS tool looks awesome :)
Ash