Specifications:
Microcontroller: PIC18f4520
Crystal: 4 MHz
Language: C Programming (not assembly codes)
Compiler: MPLAB C18 C Compiler (MCC18)
Hi everyone.
I intend to conduct a PC-to-PC communication. By sending any data from the transmitting computer, I will receive the data at the receiving computer and I want to use that data to generate analogue voltage accordingly to the DC motors. For example, a data of "4.356" is sent from the transmitting side, I have to convert this actual string to an actual analogue voltage to generate to the DC motors. I have tried "Google" and saw that to accomplish this, serial communication is needed. However, I have some major problems:
1) I am totally new to serial communication. I saw people using EUSART to do that but I have totally no idea how to do that.
2) How do I convert the data of "4.356"(For example) to an actual analogue voltage?
I have already tried communication via hyperterminal on both the transmitting and receiving side and communication works well! It is only the C programming part of PIC18F4520 that I totally have no clue on how to even start.
Can anyone please tell me how to start on this serial communication to fufill my purposes? Any comments, examples on the C programming is really much appreciated. Really need help on this.
Microcontroller: PIC18f4520
Crystal: 4 MHz
Language: C Programming (not assembly codes)
Compiler: MPLAB C18 C Compiler (MCC18)
Hi everyone.
I intend to conduct a PC-to-PC communication. By sending any data from the transmitting computer, I will receive the data at the receiving computer and I want to use that data to generate analogue voltage accordingly to the DC motors. For example, a data of "4.356" is sent from the transmitting side, I have to convert this actual string to an actual analogue voltage to generate to the DC motors. I have tried "Google" and saw that to accomplish this, serial communication is needed. However, I have some major problems:
1) I am totally new to serial communication. I saw people using EUSART to do that but I have totally no idea how to do that.
2) How do I convert the data of "4.356"(For example) to an actual analogue voltage?
I have already tried communication via hyperterminal on both the transmitting and receiving side and communication works well! It is only the C programming part of PIC18F4520 that I totally have no clue on how to even start.
Can anyone please tell me how to start on this serial communication to fufill my purposes? Any comments, examples on the C programming is really much appreciated. Really need help on this.