PIC-P14-20MHz Olimex Ltd., PIC-P14-20MHz Datasheet - Page 8

MCU, MPU & DSP Development Tools PROTOTYPE BRD ICSP/ ICD ENABLED 14 PIN

PIC-P14-20MHz

Manufacturer Part Number
PIC-P14-20MHz
Description
MCU, MPU & DSP Development Tools PROTOTYPE BRD ICSP/ ICD ENABLED 14 PIN
Manufacturer
Olimex Ltd.
Datasheet

Specifications of PIC-P14-20MHz

Processor To Be Evaluated
14 Pin PIC Devices
Interface Type
RS-232, ICSP
Dimensions
100 mm x 80 mm
Operating Supply Voltage
3.3 V, 5 V
Silicon Manufacturer
Microchip
Core Architecture
PIC
Kit Contents
Board
Features
RS232 Tx/Rx Interface, Power Plug-In Jack
Mcu Supported Families
PIC-P14 MCUs
Rohs Compliant
Yes
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Other names
1776339 52R3655
//PROGRAMM FOR rs232 communication
//
// PROCESSOR : PIC16F688
// CLOCK
// SPEED
#include
__CONFIG(WDTDIS & MCLREN & BORDIS & HS & PWRTEN & FCMDIS & IESODIS) ;
unsigned char ch;
void InitUsart(void) {
}
void
}
unsigned char ReadByte(void) {
}
// main function
void main( void ) {
}
WriteByte(unsigned char byte) {
// TX Pin - output
TRISC4 = 0;
// RX Pin - input
TRISC5 = 1;
// RX Setting, 8bit, enable receive,
RCSTA = 0x90;
// TX Setting, 8bit, Asinchronius mode, High speed
TXSTA = 0x24;
// Baudcontrol - disable auto mode, 8bit baudrate
BAUDCTL = 0x00;
// Set Baudrade - 9600 (from datasheet baudrade table)
SPBRG = 129;
// wait until register is empty
while(!TXIF);
// transmite byte
TXREG = byte;
// wait to receive character
while(!RCIF);
// return received character
return RCREG;
// Init Interface
InitUsart();
// loop forever - echo
while(1) {
}
: 20MHz, EXTERNAL
: 9600 bps(1bit=104us)
If you programmed the PIC correctly and wired the UART, when you open
Hyperterminal on your host PC computer with 9600 bps, 8 data bit, 1 stop
bit, No flow control and apply power supply to the PIC-P14 every character
you type on the hyperterminal will be printed back with “*” i.e. if you type
“abc” you will receive “a*b*c*”.
<pic.h>
ch = ReadByte();
WriteByte(ch);
WriteByte('*');
//wait to receive character
Page 8
//send it back followed by “*”

Related parts for PIC-P14-20MHz