I have the "Send_to_PC_Terminal_Example_via_TTL_Converter_HardwareUART" working perfectly with a PIC16F688, and a low cost CH340G USB2TLL converter, but with the PIC16F1455 at default clock setting I just get gibberish.
very simple config...
; ----- Configuration
;#chip 16F688, 4
; WORKS!
;#config MCLRE = ON
;#chip 16F1455
; DOES NOT...
Any ideas what I've done wrong?
Best,
Randy
Last edit: Randall Young 2016-05-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well a continuing oddity! 4 Mhz is the one setting that doesn't output and characters at all. I know the clock is pretty complicated on the chip to support auto-tuning from USB, I'm wondering if I'm missing a config bit setting.
Here's the slightly modified demo code:
;-----Configuration;#chip 16F688, 4;#config MCLRE = ON;exclamationistosuppressdisplaylargefontonposting.!#chip 16F1455, 4;-----DefineHardwaresettings' THIS CONFIG OF THE SERIAL PORT TO A PC TERMINAL via a TTL Converter' USART settings#define USART_BAUD_RATE 9600DirPORTc.4OutDirPORTc.3In#define USART_DELAY 5 ms#define USART_BLOCKING;-----Variables' No Variables specified in this example. All byte variables are defined upon use.;-----Mainbodyofprogramcommenceshere.'Message after resetwait500msHSerPrint"First Time!"' "Carriage Return"HSerSend13' "Line Feed"HSerSend10wait3secdoForeverHSerPrint"Hello World, Randall Young"' "Carriage Return"HSerSend13' "Line Feed"HSerSend10wait2secLoop
Last edit: Randall Young 2016-05-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The PIC16F1847 was more cooperative this morning. Running on a 18-pin PIC Demo LPC board.
;NOTE:removeall!signsforcutandpaste.'''A demonstration program for GCGB and GCB.'''--------------------------------------------------------------------------------------------------------------------------------'''This program sends characters from microprocess using the GCB Hardware-UART methods via a TTL converter.'''YouhavetoaddSCKP-SynchronousClockPolaritySelectbitactsdifferentlydependingonEUSARTmode.'''Asynchronous mode:'''-1-TransmitinverteddatatotheRC6/TX/CKpin;and'''-0 - Transmit non-inverted data to the same pin.'''@authorEvanR.Venn'''@licence GPL'''@version1.0a'''@date 31.01.2015'''********************************************************************************' ----- Alternate Configuration'#chip 16F688, 4'#config MCLRE = ON'#chip 16F1455, 16'----- Define Hardware settings!#chip 16F1847, 4 ' THIS CONFIG OF THE SERIAL PORT TO A PC TERMINAL via a TTL Converter USART settings#define USART_BAUD_RATE 9600DirPORTB.2OutDirPORTB.1In#define USART_DELAY 5 ms#define USART_BLOCKING'Potentiometer on AN0, Part Number DM164120-4 - PICkit 18-Pin Demo Board'set jumper 5, closed. Adjusting POT changes voltage reported by AN0#define POT_PORT PORTA.0#define POT_AN AN0' ----- Variables' No Variables specified in this example. All byte variables are defined upon use.' ----- Main body of program commences here.'Message after resetwait500msHSerPrint"One Time!"' "Carriage Return"HSerSend13' "Line Feed"HSerSend10wait3secdoForeverHSerPrint"Hello World, GCB & PIC16F1847"' "Carriage Return"HSerSend13' "Line Feed"HSerSend10wait3sec;pumpdataoutserialHSerPrint"Sensor Reading: "HSerPrintReadAD10(POT_AN)HSerSend13HSerSend10wait3secLoop
Last edit: Randall Young 2016-03-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No sir I do not, my thought is/was to get it working with some flavor of PIC or another then, then take a look at the ASM file, and see if I could determine as much as possible considering the subtle differences between the PICS themselves, what the problem is. So, I have it up on '1847 but not on the '1455...
I've had good luck on the PIC16FXXXX and Great Cow on a recent LCD project I need to post and share, the manifold and complex timing issues, just seem to work correctly on the mid-range extended products.
R.
Last edit: Randall Young 2015-05-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here's the source slightly adapted to work with PIC18F14k22, shows the true power of Great Cow to port across the PIC ecosystem, with just a few simple changes. Hosted on PICkit2 LPC demo board for test. Communicating to 2$ CH340G USB2TLL converter.
'' slight modification to host PIC18F14k22
'''@author Randall Young
Remove all !, used to deal with display issues.
;---configuration*#chip 18f14K22, 16 #config WDTEOFF , MCLREOFF , CPDOFF , BORENON, IESOOFF, FCMENOFF!#config PLLENOFF , STVRENOFF , LVPOFF;---uartsetup,TXDataoutRB.7viaBlackwire!#define USARTBAUDRATE 57600DirPORTB.7OutDirPORTB.5In!#define USARTDELAY 5 ms!#define USARTBLOCKING'Potentiometer on AN0, Part Number DM164120-4 - PICkit 18-Pin Demo Board'set jumper 5, closed. Adjusting POT changes voltage reported by AN0!#define POTPORT PORTA.0!#define POTAN AN0;-----Variables' No Variables specified in this example. All byte variables are defined upon use.;-----Mainbodyofprogramcommenceshere.'Message after resetwait500msHSerPrint"One Time"' "Carriage Return"HSerSend13' "Line Feed"HSerSend10wait3secdoForeverHSerPrint"Hello World, GCB & PIC18F14k22"' "Carriage Return"HSerSend13' "Line Feed"HSerSend10wait3sec;pumpdataoutserialHSerPrint"Sensor Reading: "HSerPrintReadAD10(POTAN)HSerSend13HSerSend10wait3secLoop
Hi Folks,
I have the "Send_to_PC_Terminal_Example_via_TTL_Converter_HardwareUART" working perfectly with a PIC16F688, and a low cost CH340G USB2TLL converter, but with the PIC16F1455 at default clock setting I just get gibberish.
very simple config...
Any ideas what I've done wrong?
Best,
Randy
Last edit: Randall Young 2016-05-15
@Randall. I am glad to here the demos are working for you. Nice to hear this. 😃
You need to add the 4 for 4 MHz.
Otherwise it will default to the internal oscillator default setting of 500KHz on the PIC16F1455 (per the data sheet).
@Chuck. Spot on answer. I will update the Help File to explain this a little more clearly.
All,
Well a continuing oddity! 4 Mhz is the one setting that doesn't output and characters at all. I know the clock is pretty complicated on the chip to support auto-tuning from USB, I'm wondering if I'm missing a config bit setting.
Here's the slightly modified demo code:
Last edit: Randall Young 2016-05-15
What clock speed should this result in. No PLL (not 3X) no CPUDIV. HS clock source for FOSC_INTOSC?
Last edit: Randall Young 2016-03-22
All,
The PIC16F1847 was more cooperative this morning. Running on a 18-pin PIC Demo LPC board.
Last edit: Randall Young 2016-03-22
Here's a screen cap of it working...
Simple is good.
Nice job. Any idea what 'fixed' the issue?
A.,
No sir I do not, my thought is/was to get it working with some flavor of PIC or another then, then take a look at the ASM file, and see if I could determine as much as possible considering the subtle differences between the PICS themselves, what the problem is. So, I have it up on '1847 but not on the '1455...
I've had good luck on the PIC16FXXXX and Great Cow on a recent LCD project I need to post and share, the manifold and complex timing issues, just seem to work correctly on the mid-range extended products.
R.
Last edit: Randall Young 2015-05-15
All,
Here's the source slightly adapted to work with PIC18F14k22, shows the true power of Great Cow to port across the PIC ecosystem, with just a few simple changes. Hosted on PICkit2 LPC demo board for test. Communicating to 2$ CH340G USB2TLL converter.
'' slight modification to host PIC18F14k22
'''@author Randall Young
Remove all !, used to deal with display issues.
Last edit: Randall Young 2016-03-22
Good job. May I edit and publish?
@Randall. I edited to add '~~~~ to your posting to correct the formatting errors. :-)