Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <msp430x14x.h>
- #include "lcd.h"
- #include "portyLcd.h"
- #define DD_RAM_ADDR 0x80 // set DD_RAM 2 line
- unsigned char i;
- unsigned char znak;
- void napis(char napis[])
- {
- int a = strlen(napis);
- clearDisplay();
- for( i =0; i < a; i++){
- SEND_CHAR(napis[i]);
- }
- for (i=0;i<32;i++){
- SEND_CMD(DATA_ROL_RIGHT); // przesuwanie napisu w lewo
- Delayx100us(250); // opóYnienie
- if(i > 16 - a)
- {
- int j = i - 16;
- gotoSecondLine();
- SEND_CHAR(napis[j]);
- }
- }
- }
- void main( void )
- {
- P2DIR |= BIT1 ; // STATUS LED
- WDTCTL=WDTPW+ WDTHOLD; // zatrzymanie WDT
- InitPortsLcd(); // inicjalizacja portów
- InitLCD(); // inicjalizacja LCD
- clearDisplay(); // czyszczenie LCD
- napis("test");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement