Serial LCD and breadboards that I bought from eBay

I’ve been doing some shopping lately on The eBay. I went into my barn the other day and couldn’t find a single solderless breadboard. How can an experimenter work without one? So I tried to find some SPICE programs to help me play some. No way! That is not something I want to spend hundreds to thousand of dollars on.

I received some breadboards and wires from eBay today, and I took a clipboard and stuck the solderless breadboards to the clipboard. Now you could call it a solderless clipboard. I then did some experimenting with my LCD. I used a PIC16F690 microcontroller programmed in C (of course I’m still learning). I did my best, and it only took about 5 or 6 different programs to get things going like I wanted them to. The built-in function PRINTF() was definately rocking. It’s step one in getting the temperature probe working. Temperature, Humidity, Dewpoint and Clock datalogger

The program below is compressed a little to fit in the space, but this is how I get this to work. Bear in mind that I have the CCS C compiler, and I used the Pickit 2 available from Microchip. Also, I took a video of the clipboard with its “fake data.” The only pins I used are pins 11 and 12 (PIN_B5 and PIN_B6) connected to the LCD. Then the powers and grounds and VDDs and VCCs.

#include “16F690.h”
#fuses intrc_io,nomclr,nobrownout,nowdt,put
#use delay(clock=4000000)
#use rs232(baud=9600,rcv=PIN_B6,xmit=PIN_B5)

#define cntrl 0xfe #define backlite 0×03 #define contrast 0×04 #define dispon 0x0a
#define dispoff 0x0b #define clrscreen 0×14 #define brite 0x3c #define contrnorm 0x0a
#define homecursor 0x0d #define curspos 0x0c //use to move to line 2 (1,0)
#define degree 0xdf

void main()
int16 tf=95,rhTrue=60,dewpoint=72; //these are the variables, I’ve just substituted values
int hour=14,minute=30,mm=10,dd=2,yy=82; //these are the variables, I’ve just substituted values

delay_ms(2000); printf(“%c%c%c”,cntrl,backlite,brite); //use to control lcd backlite
delay_ms(100); printf(“%c%c%c”,cntrl,contrast,contrnorm);//use to control lcd contrast
/*use to turn display on*/
printf(“%c%c”,cntrl,dispon); delay_ms(100);

printf(“Hello, World!”); delay_ms(4000);
while (1)
/*use to clear screen*/ printf(“%c%c”,cntrl,clrscreen);

printf(“%c%c”,cntrl,homecursor); delay_ms(5);
printf(“%3.0Lu%cF %2.0Lu%%H %u:%u”,tf,degree,rhTrue,hour,minute); delay_ms(5);
printf(“%c%c%c%c”,cntrl,curspos,1,0); delay_ms(5);
printf(“%3.0Lu%cDP   %u/%u/%u”,dewpoint,degree,mm,dd,yy);  delay_ms(2000);
} //end while(1)
} //end void main()

This entry was posted in Electronics and tagged , , , , , , by robbie. Bookmark the permalink.

About robbie

I am an electronics enthusiest and a ham radio operator (W1RCP). I like to play with electronics. It's fun and educational. I looked forward to working in the engineering field in the future. I have a BS in Electronics Engineering Technology from DeVry University. I also have an Associate's degree in Marketing Management from Moultrie Tech, and a diploma in Electronics from MTC.

Comments are closed.