tag:blogger.com,1999:blog-3851144877322223496.post4999614035165975644..comments2024-02-29T00:18:14.284+02:00Comments on Liviu Istrate: Library for interfacing alphanumeric LCD modules with AVR microcontrollersLiviu Istratehttp://www.blogger.com/profile/15953813368190792312noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-3851144877322223496.post-10088808602725288322023-11-22T01:27:58.077+02:002023-11-22T01:27:58.077+02:00I appreciate your comment. Best wishes to you too....I appreciate your comment. Best wishes to you too.Liviu Istratehttps://www.blogger.com/profile/15953813368190792312noreply@blogger.comtag:blogger.com,1999:blog-3851144877322223496.post-7707593093247732652023-11-21T23:27:36.438+02:002023-11-21T23:27:36.438+02:00hi
i just used your header file in my project and ...hi<br />i just used your header file in my project and wanna say thank you .. <br />wish the bestSRiinoreply@blogger.comtag:blogger.com,1999:blog-3851144877322223496.post-83637454077003638402021-06-23T21:54:37.413+03:002021-06-23T21:54:37.413+03:00Hi. If the LCD is connected as in my example the c...Hi. If the LCD is connected as in my example the code with the IO pins must be configured like so:<br /><br />#define LCD_DATA_DDR DDRC // Data bus (DB0 to DB7 on LCD pins)<br />#define LCD_DATA_PORT PORTC<br />#define LCD_DATA_PIN PINC // Used to check busy flag<br /><br />#define LCD_DATA_START_PIN 2<br /><br />// Register selection signal - RS<br />#define LCD_RS_CONTROL_DDR DDRD<br />#define LCD_RS_CONTROL_PORT PORTD<br />#define LCD_RS_PIN PD0<br /><br />// Read/write signal - RW<br />#define LCD_RW_CONTROL_DDR DDRD<br />#define LCD_RW_CONTROL_PORT PORTD<br />#define LCD_RW_PIN PD1<br /><br />// Enable signal - E<br />#define LCD_E_CONTROL_DDR DDRD<br />#define LCD_E_CONTROL_PORT PORTD<br />#define LCD_E_PIN PD2<br /><br />#define LCD_DATA_BUS_SIZE LCD_DATA_4_BITSLiviu Istratehttps://www.blogger.com/profile/15953813368190792312noreply@blogger.comtag:blogger.com,1999:blog-3851144877322223496.post-32836438939727125432021-06-23T21:45:36.977+03:002021-06-23T21:45:36.977+03:00LCD_DATA_PIN depends on the port where you have co...LCD_DATA_PIN depends on the port where you have connected the 4 or 8 data pins. For port C LCD_DATA_PIN will be PINC or PIND for D port. So LCD_DATA_PIN is defined as PINx where x is the port letter.Liviu Istratehttps://www.blogger.com/profile/15953813368190792312noreply@blogger.comtag:blogger.com,1999:blog-3851144877322223496.post-3294575287262113762021-06-23T10:00:21.212+03:002021-06-23T10:00:21.212+03:00can you be a little more explicit with LCD_DATA_PI...can you be a little more explicit with LCD_DATA_PIN please c:Anonymoushttps://www.blogger.com/profile/11292347447030309448noreply@blogger.comtag:blogger.com,1999:blog-3851144877322223496.post-55378868448154464552021-06-23T09:47:51.623+03:002021-06-23T09:47:51.623+03:00Hi, im tryin to use your library, but i cant confi...Hi, im tryin to use your library, but i cant configure it, i get a rare characters and im trying to conect in diferents ways, can you help me please? i want to use por C for data, 4bits, or well, configure it to used like your schematic in the top, ty:(Anonymoushttps://www.blogger.com/profile/11292347447030309448noreply@blogger.comtag:blogger.com,1999:blog-3851144877322223496.post-79719946615519164002018-04-21T20:31:12.373+03:002018-04-21T20:31:12.373+03:00I will see if I can implement this in the library,...I will see if I can implement this in the library, but for now here is a solution.<br /><br />// Extract integer part and fractional part and put them in two integer vars<br /><br />float aFloatNumber;<br />uint16_t integer_part_1 = aFloatNumber;<br />float fractional_part = aFloatNumber - integer_part;<br />uint16_t integer_part_2 = (int)(fractional_part * 100);<br /><br />Now you can write it on LCD as follows<br />LCDWriteInt(integer_part_1, 3);<br />LCDWriteString(".");<br />LCDWriteInt(integer_part_2, 3);<br /><br />I didn't have the time to test it but it should work.Liviu Istratehttps://www.blogger.com/profile/15953813368190792312noreply@blogger.comtag:blogger.com,1999:blog-3851144877322223496.post-39442000448068562332018-04-21T18:54:11.653+03:002018-04-21T18:54:11.653+03:00how to write float on lcd ?
how to write float on lcd ?<br />iniesta yassine hernandezhttps://www.blogger.com/profile/02214493956462778878noreply@blogger.comtag:blogger.com,1999:blog-3851144877322223496.post-21005436062046907172017-04-17T18:20:11.854+03:002017-04-17T18:20:11.854+03:00Thank you!Thank you!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3851144877322223496.post-52129530740924040822017-04-16T21:44:47.776+03:002017-04-16T21:44:47.776+03:00Sure. Sorry for the delay; i noticed it was a prob...Sure. Sorry for the delay; i noticed it was a problem with the function when number 1 was displayed so i will update the library in a few hours.<br /><br />First you need to open the OnLCDLib header file and uncomment these two lines<br />#define CUSTOM_CHARS<br />#define BIG_DIGITS<br /><br />Then download double_height_3_characters_round_digits_v1.0.h<br />and copy the content of static const uint8_t LCD_custom_chars[] array over the one in the library.<br /><br />Now the function LCDWriteIntBig3Chars() can be used. I've made an example that imitates a clock and i've tested it on a 16 characters 2 lines LCD.<br /><br />int main(void){<br /> uint8_t seconds = 0;<br /> uint8_t minutes = 0;<br /> <br /> LCDSetup(LCD_CURSOR_NONE);<br /> <br /> while(1){<br /> if(seconds > 59){<br /> minutes += 1;<br /> seconds = 0;<br /> <br /> if(minutes > 59) minutes = 0;<br /> }<br /> <br /> LCDHome(); <br /> LCDWriteIntBig3Chars(minutes, 2); // 2 represents the number of digits to be displayed. If minutes is 1 digit only, then it will be padded with 1 zero<br /> LCDWriteBigSeparator();<br /> LCDWriteIntBig3Chars(seconds, 2);<br /> <br /> seconds += 1;<br /> _delay_ms(1000);<br /> }<br />}<br /><br />I will update this post with an example for the other function but the principle is the same.Liviu Istratehttps://www.blogger.com/profile/15953813368190792312noreply@blogger.comtag:blogger.com,1999:blog-3851144877322223496.post-49872465998082418372017-04-16T10:29:44.155+03:002017-04-16T10:29:44.155+03:00Give an example of a function please!
LCDWriteInt...Give an example of a function please!<br />LCDWriteIntBig(int16_t number, int8_t nrOfDigits);<br />LCDWriteIntBig3Chars(int16_t number, int8_t nrOfDigits);<br />LCDWriteBigSeparator(void);Anonymousnoreply@blogger.com