[Flashforth-devel] Trouble getting serial comms to work
Brought to you by:
oh2aun
From: Richard B. <ric...@gm...> - 2018-09-17 10:20:22
|
Hi all, I was given a board with a pic on it, the 18f45k20. It uses a 12288kHz crystal. While I have used several forths on micro's I'm not claiming any expertise. So I compile an image, using constant clock=d'12288000' ; Hz in p18f-main.cfg. And in p18f2x4xk20.cfg #define PLL DISABLE ; ENABLE or DISABLE And somewhere I remember a setting to use the external crystal. So I flash the pic and hook up a serial port at 38400, 8N1. And on power all I get is garbage. I used Pulseview to see what is coming out of the serial port. The minimum pulse in the data stream at power up is consistent with 38400 baud. But instead of any kind of ascii being decoded I get frame errors on each byte and nothing like ascii. In ff-pic18.lst I can see that at line 481 00481 #include p18f45k20.inc the right processor is being included so I assume I have everything set up correctly. But clearly I am making a silly error somewhere. Does anyone have advice on what I should check please? Or what further information should I supply to shed light on this please? Many thanks Richard |