Therefore I strongly suggest that you leave the locking and unlocking right out of your code until you have gained experience with the device and your code - in other words this should be one of the last aspects of your code that you add. ![]() However, the power on default for PPS1WAY is to not allow the PPSLOCK to be altered after it has been set. Software UART is working, but I need hardware UART for my application.įirst off, the power on default is for the PPS registers to be unlocked. I have disabled the analog function for Rx pin, set the Rx pin as input, and Tx pin as output.Ĭannot REMAP pins until Unlock_IOLOCK() and other mapping functions work. Program is working, not stuck, as I had put in code to toggle an output every cycle, and the output was toggling turning the LED on/OFF. data is transmitted from PC to Rx pin, but does nothing. It did not receive, nor transmit anything. It did not give any errors, but it did not work either. ![]() So, I tried remappable UART library functions. To remap the pins, it gives an error again, saying, "Undeclared identifier 'Unlock_IOLOCK' in expression MyProject.c" refreing to the line where I had used this function. If I use the library function: Unlock_IOLOCK() "Unresolved extern 'PPS_Mapping' _Lib_UART_Remappable.c" When I use the UART library routines, it gives the following error: ![]() but I am not able to get this one working. I have worked on hardware uart earlier with other PIC controllers. I am trying to get the hardware UART working on PIC16F1618 8MHz, 9600bps.
0 Comments
Leave a Reply. |