K
K
Kopranych2016-06-17 17:06:30
Microcontrollers
Kopranych, 2016-06-17 17:06:30

Display HD44780 and Atmega16?

I wrote a code to display text on the HD44780 display via mega16 and everything worked and displayed lines until I turned off the power (namely, I pulled the USB out of the laptop). The next time I turn it on, only one line lights up on the display, although I initialize two and nothing more. The display does not react in any way and does not output anything. I set all the ones on the control and data lines, I measured the voltage with a multimeter, there are 4.05V, i.e. signal reaches the display. How can it be started, or has it burned out and how to understand this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Armenian Radio, 2016-06-17
@gbg

Filling the display in half is a standard test. Somewhere at you with initialization of a problem.

K
Kopranych, 2016-06-19
@Kopranych

Here is the initialization
[Spoiler=]

void LCD_init()
{	
  _delay_ms(40);//
  DDR_DATA |= 0xF0;//ïîðòû íà 
  PORT_DATA |= 0xF0;//âûõîä
  DDR_SIG |= (ON<<E)|(ON<<RW)|(ON<<RS);//óïðàâëÿþùèå ïîðòû 
  PORT_SIG |= (ON<<E)|(ON<<RS);//íà âûõîä
  PORT_SIG &= ~(ON<<RW);//ïîðò ÷òåíèÿ/çàïèñè íà íà çàïèñü
  _delay_ms(40);
  LCD_write(BUS_LINE,RS_COM);//2 ëèíèè äàííûõ, 4 áèòà øèíà
  LCD_write(0x01,RS_COM);//î÷èñòêà ýêðàíà
  LCD_write(0x06,RS_COM);//èíêðåìåíò àäðåñà ýêðàí íå äâèæåòñÿ
  
  LCD_write(0x0C,RS_COM);//âêëþ÷èòü äèñïëåé

}
[/spoiler]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question