Comments on: Using UART of PIC Microcontroller – MPLAB XC8 https://electrosome.com/uart-pic-microcontroller-mplab-xc8/ You Inspire.....We Create..... Sun, 11 Dec 2022 10:06:29 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Ligo George https://electrosome.com/uart-pic-microcontroller-mplab-xc8/#comments/10146 Sun, 11 Dec 2022 10:06:29 +0000 https://electrosome.com/?p=8641#comment-10146 In reply to Ricardo F. Hernandez Hernandez.

You can download it from the above link.

]]>
By: Ricardo F. Hernandez Hernandez https://electrosome.com/uart-pic-microcontroller-mplab-xc8/#comments/10142 Sun, 27 Nov 2022 23:38:29 +0000 https://electrosome.com/?p=8641#comment-10142 Hi. Where may I found the file uart.h?

]]>
By: Ligo George https://electrosome.com/uart-pic-microcontroller-mplab-xc8/#comments/9635 Sun, 03 May 2020 10:22:43 +0000 https://electrosome.com/?p=8641#comment-9635 In reply to geek.

Sorry, I don’t have ready example code now.
A simple solution would be as below.
Consider the size of the float variable is 4 bytes..
you can copy it to a 4 byte character array using memcpy().

Then you can send it easily send it via UART..

In the receiver side you can do the same memcpy() to copy back to float variable from the array.

If you are looking for a professional support you can mail [email protected].

]]>
By: geek https://electrosome.com/uart-pic-microcontroller-mplab-xc8/#comments/9634 Sun, 03 May 2020 10:05:12 +0000 https://electrosome.com/?p=8641#comment-9634 In reply to Ligo George.

can u please share an example code??

]]>
By: Chris https://electrosome.com/uart-pic-microcontroller-mplab-xc8/#comments/9616 Wed, 22 Apr 2020 00:13:31 +0000 https://electrosome.com/?p=8641#comment-9616 I had figured that an RS232 to USB converter would be the easiest way. I have been trying to use a PIC that had an internal USB (PIC18F4550) but I haven’t been able to get it to work. I just ordered a serial to USB converter to give it a test. My development board has the RS232 port. I may need help with the code. When I do I will send my request to ligo. Thank you very much. Chris.

]]>
By: Ligo George https://electrosome.com/uart-pic-microcontroller-mplab-xc8/#comments/9615 Tue, 21 Apr 2020 14:34:06 +0000 https://electrosome.com/?p=8641#comment-9615 In reply to Chris.

If you are planning to use a serial port (UART) of a PIC microcontroller.. you would need a USB to UART converter in the middle..

]]>
By: Chris https://electrosome.com/uart-pic-microcontroller-mplab-xc8/#comments/9614 Tue, 21 Apr 2020 12:57:49 +0000 https://electrosome.com/?p=8641#comment-9614 In reply to Ligo George.

Thank you for the reply. The machine with the USB port is designed to be controlled by and hooked directly to a PC. I want to not use the PC any longer. I want to control the machine from a PIC. My question was asking if I needed any kind of signal level conversion or will the TTL from the PIC be able to directly connect to the machines USB Port?

]]>
By: Ligo George https://electrosome.com/uart-pic-microcontroller-mplab-xc8/#comments/9613 Tue, 21 Apr 2020 11:39:02 +0000 https://electrosome.com/?p=8641#comment-9613 In reply to Chris.

I don’t understand the term “USB port to receive ASCII commands”. If your machine accepts TTL serial communication (9600 8N1), you can use the UART, just need to program the microcontroller appropriately. If you are looking for professional support you can mail [email protected].

]]>
By: Chris https://electrosome.com/uart-pic-microcontroller-mplab-xc8/#comments/9612 Tue, 21 Apr 2020 01:07:56 +0000 https://electrosome.com/?p=8641#comment-9612 Hi,
I want to control a machine that has a USB port to receive ASCII commands. I need to control it from a PIC with no PC. Can I just feed the TTL into the machines USB port? If not, is there a way to convert the signals from the PIC to something the machine can understand? It is a simple machine that is looking for 9600 8N1. Thank you.

]]>
By: Ngo Huu An https://electrosome.com/uart-pic-microcontroller-mplab-xc8/#comments/7162 Fri, 07 Sep 2018 21:08:31 +0000 https://electrosome.com/?p=8641#comment-7162 thank you, it’s very helpful to me

]]>