//
// rs2321.c
//
// This is a sample C program to talk to a serial LCD
// (in this case, a PIC AN LCD from www.bgmicro.com)
//
// This one example shows why it is nice to use C!
//
// The LCD TTL port pin 1 and a ground are brought from
// the LCD module to the '84 on a board. Pin 1 from the
// LCD TTL port is tied to pin B0 of the 16F84. Although
// pin B1 is nominated as the receive pin, it is not used
// in this example.
//
// Note: this is for serial LCD - meaning you probably
// had to put the LCD together with a support board. This
// will not work with just the LCD itself. The BGMicro
// PIC AN LCD module works fine - but it is a kit that
// you have to put together (takes about 20 minutes)
// I've also got a similar
// module coming from www.phanderson.com.
//
// Using '84 on a board (simple solderless breadboard with
// 16F84 on it)
//
// Settings:
// 4Mhz resonator (important - you must tell compiler which
// oscillator speed you are using)
// Port A not used
// Port B pin 0 and pin 1 are xmit and receive (receive not used)
//
// Hook this up, turn on the PIC, turn on the LCD, hit reset
//
#case
#include <16f84.h>
#fuses xt,nowdt,noput,noprotect
#use delay(clock=4000000) // necessary for the 'rs232' directive
#use rs232(baud=9600, xmit=PIN_B0,rcv=PIN_B1,parity=n,bits=8)
void main(void)
{
printf("Hello, world!");
}