i swear im so dumb. i just couldnt take it anymore and i was just staring at MPLAB in anger and then wen i was daydreaming i saw a "0" where it should have been a "1". i was keeping the reset button of the lcd pressed down all the time!!!!!! i got so excited an i corrected it and i am able to partically initialised the lcd and display some stuff on it, i say partially because here is the problem...
i had a a fair bit of code and the lcd wasnt working how i wanted it to so i reduced the code significantly, and i am trying to do a basic initialisation of lcd, and display two letters, "T" on the first line, and "u" on the second line... now here are the problems..
when i write code to display "T" and "U" on the same line one after another, it works perfectly, however when i modify the code so that "u" can appear on the second line it doesnt work.
the memory location on the lcd for text ranges from 00 to something greater than FF but thats irrelivant. im using a 128x64 lcd, with siez 6x8 font. 128/6 = 21.3 which means i can display a max of 21 characters on one line.
i set the text area of the lcd to 21, which means, there are 21 columns, the first column ranges from 0 to 20, and the second column starts on 21 (these numbers are memory locations for text on the lcd).
i configure the lcd to have 21 columns, and i set the address pointer to "00" and write the "T" on the first column top left corner, then i set the text pointer to "21" (so that its on beggining of second line), and i write and program pic.
now get this.. the pic programmer has a built in breadboard, and i am supplying two of those breadboard pins with Vdd and Vss, with two wires, these are plugged into the breadboard from the lcd(and pic)... and the programmer has a powersupply socket where i connect a proper powersupply. when i take out the Vcc wire from the bread board, and touch it again, and take out, and touch it again, the display on the lcd changes to something else every time!!! but if i leave that wire in, and i disconnect the programmers proper powersocket and put it on, then the lcd always displays(most of the time) the last thing that was on the screen.
i am using those very bendy wires which r made of many strands of wire because the single wire ones snap easily.
this made me think there could be a problem with the wire supplying the 5v but then i though nah cant be.
i thought mayb my algorithms for writing to lcd arent correct but they must be other wise it wont be displaying what i told it to display, im guessing communication with LCD is ok. i set address pointer to 21 and write, but instead of going to second line, it just flows off the screen, so i change the text home address (upper left corner of screen) to 21 and low and behold the "u" is in the top left of the screen. i just dont get why. i have connected all pins with just a piece of wire with no resistors other than ra5/mclear.
i took out my multimeter and put it in diode mode so that i can check if there are any shorts.. when there is a connection the multimeter shows a few random numbers initially, beeps and then displays "000", when there is no connection it shows 1, when i was testing the adjacent tracks of the lcd and pic, most of them read "1" and there was no beep, but on a few tracks the numbers went all random and crazy on the screen BUT there was no beep? does this mean something? iv checked the software so many times, so now im building it again to check hardware. could someone please tell me how to do in software a proper POWER ON RESET and configuration for pic16f628 because i am unsure mayb i am doing this wrong.
i have attatched the "simple" code that im using to do what im describing above. i am using toshiba 6963C controller whos datasheet can b found easily on net, my posts above show what pins of the pic iv connected to which pins of the lcd.
iv been going in circles for weeks and im going crazy. please help me.
thank you