0
\$\begingroup\$

I am using the MPLAB Code Configurator for serial communication via a UART. My clock setting for system is FRC oscillator set to 8 MHz with PLL enabled (4x multiplier) to make a 32 MHz clock.

I am confused on which clock source and baud rate to set up for the UART. The clock sources are FRC, PB and SYSCLOCK.

\$\endgroup\$
5
  • \$\begingroup\$ You should be able to use any clock as long as you set the UART clock divider to get the baud rate you need. The baud rate you need will be determined by the device you're talking to. \$\endgroup\$ – DKNguyen Nov 23 '20 at 4:27
  • \$\begingroup\$ i tried implementing that but when i run my program through pic microcontroller i get random characters at the beginning , and data is also not being transmitted . \$\endgroup\$ – g ghimire Nov 23 '20 at 5:08
  • \$\begingroup\$ Is the clock source an internal RC oscillator? How accurate is the FRC? What kind of connections you have from the UART, TTL level or RS232 level? Is it connected to where, a PC? How, with what kind of cable, TTL or RS232? \$\endgroup\$ – Justme Nov 23 '20 at 5:52
  • \$\begingroup\$ My source is 8 Mhz internal RC oscillator . The host is a pic32mm microcontroller using UART, and is connected using breadboard wires \$\endgroup\$ – g ghimire Nov 23 '20 at 15:19
  • \$\begingroup\$ @gghimire, I created an MCC project for the PIC32MM0064GPL036 and a UART. You can see it at this link. It works in the simulator, perhaps it can work for you. \$\endgroup\$ – Dan1138 Nov 24 '20 at 1:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.