
SYSTEMConfig(SYS_FREQ,SYS_CFG_WAIT_STATES | SYS_CFG_PCACHE) Configure the device for maximum performance PIN configuration for UART Tansmit and UART Reception

#define T1_TICK (SYS_FREQ/PB_DIV/PRESCALE/TOGGLES_PER_SEC) #define INTERRUPT (CHANGE_INT_ON | CHANGE_INT_PRI_2) #define SWITCH3 PORTDbits.RD13 // PORTDbits.RD13Pins 23 CN4 #define SWITCH2 PORTDbits.RD7 // PORTDbits.RD7 Pins 24 CN3 #define SWITCH1 PORTDbits.RD6 // PORTDbits.RD6 Pins 25 CN2 #define BRGVAL ((FCY/DESIRED_BAURATE)/16)-1 #define FCY (SYS_FREQ*PLLMODE)/2 // Intruction Cycle Frequency #define PLLMODE 4 // On Chip PLL setting (Fosc) #define SYS_FREQ (80000000L) // On board Crystal frequency given the osicllator freqeuncy and PLLMODE
#Hyperterm windows generator
Defines to simply UART's baud rate generator (BRG) regiser #pragma config POSCMOD = HS, FNOSC = PRIPLL, FPBDIV = DIV_8, IOL1WAY = ON #pragma config FPLLMUL = MUL_20, FPLLIDIV = DIV_2, FPLLODIV = DIV_1, FWDTEN = OFF #pragma config IOL1WAY = ON // Peripheral Pin Select configuration #pragma config DEBUG = ON // Debugger Enable for Starter Kit #pragma config ICESEL = ICS_PGx2 // ICE/ICD Comm Channel Select #pragma config PWP = OFF // Program Flash Write Protect #pragma config BWP = OFF // Boot Flash Wire Protect #pragma config FSOSCEN = OFF // Secondary Oscillator Enable #pragma config IESO = OFF // Internal/External Switch over #pragma config POSCMOD = HS // Primary Oscillator Maybe XT #pragma config OSCIOFNC = OFF // CLKO Enable #pragma config FCKSM = CSDCMD // Clock Switching & Fail Safe Clock Monitor #pragma config WDTPS = PS1 // Watchdog Timer Postscale #pragma config FWDTEN = OFF // Watchdog Timer

#pragma config FPBDIV = DIV_1 // Peripheral Clock divisor

#pragma config FPLLODIV = DIV_1 // PLL Output Divider #pragma config FPLLMUL = MUL_20 // PLL Multiplier #pragma config FPLLIDIV = DIV_2 // PLL Input Divider (PIC23 Started Kit) #pragma config FNOSC = PRIPLL // Oscillatoe Selection I want to display the result of this code in the hyper terminal windows but I am getting weird characters instead. PIC32 Weird Characters are displayed in the hyperterminal windows
