News:

;) This forum is the property of Proton software developers

Main Menu

Les Interrupt driven Serial Routine for 27k42

Started by JonW, Dec 09, 2022, 12:50 PM

Previous topic - Next topic

JonW

Les
What is needed to change on your int driven serial routine on the 27k42 so it can run on the 26k42?


RGV250

I can't look as I do not appear to have that in my samples, only one for 16F877. I would think all it would need is the config settings and possibly the UART settings but I think they have been improved with the newer versions so you may not need to touch them if you are lucky.

Bob

JonW

No Worries
I wrote another one quickly.

J

top204

Sorry for the delay in replying.

According to the datasheet, they are the same device, but the 18F26K42 device has less flash and RAM. This means the interrupt routine I created for the 18F27K42 device "should" work on the 18F26K42 device, but with microchip, you can never tell now! However, I did notice that I forgot to change the "UART_TYPE=1" to "UART_TYPE=2" in the "P18F26K42.ppi" file, so it will need changing to "UART_TYPE=2".

Or use the declare: "Declare UART_Type = 2", in the program listing.


JonW

#4
No worries Les, I know you are a busy man.

Am working on a new 4 port 1MHz to 6GHz 0 - 120dB attenuator and needed the UART interrupt driven but only have the 26k on hand and  as I have both USB and Ethernet connection options running simultaneously it needs to be quick.  Have almost finished a new library for the W5500 IC  with bit banged SPI embedded, currently have UDP functionality with sockets working but unfortunately the W5500 datasheet is poorly written and the only way to really understand how the device works is to reverse engineer their horrific and overly complex C libraries.  Even the schematics and interface documentation was confusing but managed to get an integrated connector & transformer working with very few external components.  Once its up I will share the code and schematics for the device and will also try to take a look at a TCP or running a web server on the PIC!

J