UART Issue with PICDEM PlUS 2 board

  • Thread starter Neyolight
  • Start date
  • Tags
In summary: Have you checked the settings of the comport?In summary, the person is experiencing issues with their PICDEM 2 Plus board and UART code. The code initially worked but then stopped working. They have tried a loopback test and their laptop's comport works with other UART. The code and setup is provided in the conversation.
  • #1
Hi Everyone

I have a PICDEM 2 Plus board with a PIC18F4620 on it. My UART code is given. The code worked perfectly fine the first time i programmed my chip but stopped working after that.

With Hyperterminal the error is : "Unable to open COMPORT 1. Please check your port setting"

With RealTer , the error is : Break condition received

With Putty : Nothing happens

I performed a loopback test on the board ( by taking our the PIC ) and Serial-to USAB adaptor and both works fine. The comport on my laptop works fine with other UART. Please guide me..I AM SUPER LOST !

Heres the code

#include <p18f4620.h>
#include <stdio.h>
#include <delays.h>
#include <usart.h>

// INTIO67 configures internal oscillator
#pragma config OSC=INTIO67, LVP=OFF, MCLRE=ON , WDT=OFF

void setup(void)
/* Clock Setup*/
OSCCON = 0b01110010; //select 8 MHz clock

/* Port Set Up*/
ADCON1 = 0b00001111; //set all pins to digital mode
TRISD = 0x00;
TRISA = 0x00;
TRISB = 0b00000000;
TRISC = 0b10000000; // RX is an input, TX is output

// PORTBbits.RB0=1; //Turn on the 4 LEDs
// PORTBbits.RB1=1;
// PORTBbits.RB2=1;
// PORTBbits.RB3=1;

// Turn on the 4 LEDs
// Microchip recommends writing to the PORT Latch rather than the PORT Pins

/* Interrupt Setup */
INTCON = 0x00; /* Clear Registers */
PIR1 = 0x00;
PIE1 = 0x00;
TMR1L = 0x00;
TMR1H = 0x00;
T1CON = 0x00;
RCON = 0x00;

/* RS232 Enable */
// OpenUSART Configures The Next Three Lines
//RCSTA = 0b10000000;
//TXSTA = 0b00100000;
//BAUDCON = 0b01000000;

// USART 9600 8-N-1


#pragma code
void main(void)

while (1)
putrsUSART(" Hello World! ");
// while(BusyUSART());

Engineering news on
  • #2
If it worked once, then won't work again, I presume there must be some kind of hardware fault, or that you changed the state of the device.

Have you tried power off/on reset?

Related to UART Issue with PICDEM PlUS 2 board

1. What is a UART and why is it important for the PICDEM PLUS 2 board?

A UART (Universal Asynchronous Receiver/Transmitter) is a hardware component that allows for serial communication between a microcontroller, such as the PICDEM PLUS 2 board, and other devices. It is important because it enables the board to transmit and receive data in a consistent and reliable manner.

2. How do I know if there is an issue with the UART on my PICDEM PLUS 2 board?

If there is an issue with the UART, you may experience communication errors or data corruption when trying to send or receive data. Additionally, you may see error messages related to the UART in your code or the board may not respond to commands or inputs as expected.

3. What are some common causes of UART issues on the PICDEM PLUS 2 board?

Some common causes of UART issues on the PICDEM PLUS 2 board include incorrect configurations, malfunctioning hardware components, or compatibility issues with external devices. It is also possible that the UART itself may be damaged or defective.

4. How can I troubleshoot and fix UART issues on the PICDEM PLUS 2 board?

To troubleshoot and fix UART issues, you should first check your code to ensure that the UART is configured correctly. You may also want to try using different cables or external devices to rule out compatibility issues. If the issue persists, you may need to replace the UART or other hardware components on the board.

5. Is there any documentation or resources available to help with UART issues on the PICDEM PLUS 2 board?

Yes, there are various resources available such as datasheets, user manuals, and forums where you can find information and support for troubleshooting UART issues on the PICDEM PLUS 2 board. You can also consult the manufacturer's website for specific troubleshooting guides or contact their technical support team for assistance.

Similar threads

  • Electrical Engineering
  • Engineering and Comp Sci Homework Help