±ãЯʽÌåμì²âÒǵÄÉè¼Æ - ͼÎÄ

°²»Õ¹¤³Ì¿Æ¼¼Ñ§Ôº±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©

{

CCR0+=BitTime;

if((CCTL0&CCIS_1)==CCIS_1) {

//´¦ÓÚ½ÓÊÕ״̬

if((CCTL0&CAP)==CAP) {

CCTL0&=~CAP;//´Ó²¶»ñģʽתΪ±È½Ïģʽ CCR0+=hfBitTime; } else {

//¿ªÊ¼½ÓÊÕÊý¾Ý if(BitCnt!=0) {

//Êý¾Ýδ½ÓÊÕÍê RxBuf>>=1;

if((CCTL0&SCCI)==SCCI) {

RxBuf|=0x80; BitCnt--; } } else {

//Êý¾Ý½ÓÊÕÍê CCTL0&=~CCIE; RT=1; } } } else {

//´¦ÓÚ·¢ËÍ״̬

if(BitCnt!=0)//Êý¾Ýδ·¢ËÍÍê {

if((TxBuf&0x1)==0)//Òª·¢Ë͵ÄÊý¾ÝÊÇ0 {

CCTL0|=OUTMOD2;//Êä³öÑ¡Ôñ¸´Î»Ä£Ê½} else {

CCTL0&=~OUTMOD2;//Êä³öÑ¡ÔñÖÃλģʽ }

TxBuf>>=1;

¸ß½à£º±ãЯʽÌåμì²âÒǵÄÉè¼Æ

BitCnt--; } else {

//Êý¾Ý·¢ËÍÍê CCTL0&=~CCIE; RT=1; } }

CÍâÎÄÎÄÏ×¼°·­Ò븽¼

°²»Õ¹¤³Ì¿Æ¼¼Ñ§Ôº±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©

1. The principle of MSP430 LCD

MSP430 of a static LCD State, 2 MUX, 3MUX, four 4MUX Display mode, and the most commonly used or 4 MUX Mode. Popular speaking, there are four public - (Equivalent to the digital scanning display Choice of side), the number of drive-mode Type. This model is the biggest advantage Can be usedto provide at least most of the pins LCD, Figure 1 showed that 4MUX display modesof public - and-drive, Which (a) shows that a \- When the public were to end with the drive - LCD signal, the corresponding number on the show Yards.

This paper will be about 4 MUX LCD way as an example. Under this approach, an \\\Have a relationship. Therefore, in 4 MUX mode, the only need Two drive-can be said that an \

In the series to MSP430 MCU LCD driver, opened up a specialized storage space (LCDMEM1 ~ LCDMEM20) to show that the storage of information, knownas liquid crystal display buffer, or LCD significant Depositors. MSP430F435 a total of 20 bytes LCD modules Memory, if we use 4 MUX way that can significantly Showing 160 LCD stroke. At that time, each memory will

Should be two-drive. Figure 2 MUX way in the 4 The LCD memory, LCD, the LCD - The relationship.

Then to show \0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, \

¸ß½à£º±ãЯʽÌåμì²âÒǵÄÉè¼Æ

If LCD pin S0, S1, S2, S3 can even respectively. SCM then in the S0, S1, S2, S3, to LCDMEM1, LCDMEM2 send data \\

2. LCD Introduction

A total of 160 of this LCD, the LCD of Figure 3 yards The layout. And the icon above six \meaning of the symbols. Below is a row of seven \

Characters and symbols, figures show, has a specific meaning dimensional data. Figure 4 for LCD \Truth table legs.

ÁªÏµ¿Í·þ£º779662525#qq.com(#Ìæ»»Îª@)