Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4948

[solved] lcd with stm.

$
0
0
Hello , I'm trying to interface a 16x1 lcd with the stm8. My code is as follows:
(I'm using the 16MHz internal clock)
Code (C):
  1. # include "stm8l.h"
  2. # include "stm8s.h"
  3.  
  4. void lcdinit(void)
  5. {
  6.     LCD_CR1 = 0x06;
  7.     LCD_CR2 = 0xEE;
  8.     LCD_FRQ = 0X30;
  9.     LCD_PM0 = 0x92;
  10.     LCD_PM1 = 0x00;
  11.     LCD_PM2 = 0xB0;
  12.     LCD_PM3 = 0x04;
  13.     LCD_RAM0 = 0xFF;
  14.     LCD_RAM1 = 0xFF;
  15.     LCD_RAM2 = 0xFF;
  16.     LCD_RAM3 = 0xFF;
  17.     LCD_RAM4 = 0xFF;
  18.     LCD_RAM5 = 0xFF;
  19.     LCD_RAM6 = 0xFF;
  20.     LCD_RAM7 = 0xFF;...
[solved] lcd with stm.

Viewing all articles
Browse latest Browse all 4948

Trending Articles