Richard,Originally Posted by mind
could you post the changed code?
Richard,Originally Posted by mind
could you post the changed code?
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Heya
Here is the code at the moment, after changes:
Best regardsCode:INCLUDE "modedefs.bas" DEFINE OSC 4 DEFINE CHAR_PACING 1000 @ DEVICE PIC16F88, INTRC_OSC_CLKOUT, WDT_OFF, PWRT_ON, BOD_OFF, MCLR_OFF, PROTECT_OFF osccon = %01101110 sspcon = %00110001 trisb = %00000000 disable interrupt pause 500 ' wait for LCD to startup LCD_ChipSelect var portb.0 LCD_CommandLow VAR portb.1 LCD_SerialIn VAR portb.2 LCD_Clock VAR portb.4 SYMBOL mode = 5 ' tried mode 4 too HIGH LCD_ChipSelect LOW LCD_CommandLow shiftout LCD_SerialIn, LCD_Clock, mode, [$38] ' function set pause 50 shiftout LCD_SerialIn, LCD_Clock, mode, [$39] ' function set pause 50 shiftout LCD_SerialIn, LCD_Clock, mode, [$14] ' bias pause 50 shiftout LCD_SerialIn, LCD_Clock, mode, [$78] ' contrast set pause 50 shiftout LCD_SerialIn, LCD_Clock, mode, [$5E] ' contrast control pause 50 shiftout LCD_SerialIn, LCD_Clock, mode, [$6E] ' follower control pause 200 shiftout LCD_SerialIn, LCD_Clock, mode, [%00001111] ' display, cursor, blink all on pause 50 shiftout LCD_SerialIn, LCD_Clock, mode, [$01] ' clear display pause 50 HIGH LCD_CommandLow loop: shiftout LCD_SerialIn, LCD_Clock, mode, ["Hello world"] Pause 500 ' Wait .5 second Goto loop ' Do it forever
Richard
Richard,
I'm sorry I have to say this, but I'm not going to study the entire Datasheet for you.
Here are some hints:
- ChipSelect is active LOW, not HIGH
- Data is sent MSB first with clock Idling HIGH --> Mode 5
- Set OSCON according to your clock source and speed ($60 for 4MHz INTRC)
Your schematic would also help to analyze the problem.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Hello Richard,
I still do not see a 13 being passed to your LCD in your code...
Comment out all the wacky stuff....ALL of it....
Send just the 13 and Hello world.
I think you are bitin off more than you can chew all at once my friend.
Make sure you have a pause 500 (1/2 second delay to make sure the LCD is turn on and "warmed up" (as I call it).
A 1/2 second pause before you send the 13, and a 1/2 second pause after you send the 13... then send Hello world.
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Dwayne,
thanks for trying to help,
but at the moment there are other problems that "13"
You can send as many "13's" as you want,
if the Controller is never selected it will just do nothing!
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Hello Richard,
You made a comment, that this is your first project...
One projects as such, it is best to go the very BASICS of everything. Do not add bells and whistles *until* you get the crazy thing working. You said it was HD44780 compatible...
Sending a Dec 13 will turn on the display and allow you to print ascii to it. This should be your main concern... NOT whether it blinks, does whistles, changes lines, smokes cigarettes for you, or drinks beer. 8-}
AFter you get just those two things to work.. THEN experiement with one added command at a time....
You are slowly eliminating variables... one at a time... instead of trying to elminate 15 variables... in which one of those 15 could be what you really need!
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
DWAYNE,
PLEASE...
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Hello Ralph,
Gosh you ought to be proud of me remembering to "Quote" <chuckle>thanks for trying to help,
but at the moment there are other problems that "13"
You can send as many "13's" as you want,
if the Controller is never selected it will just do nothing!
I agree with you... I sent another message... I just see so many "Variables" he is trying to play with...When he should only be concerned with one Variable...Turning it on. And possibly another... Writing "Hello" to it to verify that it is turned on.
I have not used the Shiftout method... you did a splinded job on seeing that in the Data sheet. I can only assume he knows how to write to the controller... (how ever that is)... LIke you said before(which I agree)... I am not going to read the manual of a LCD that I don't care to use... But you and I both know what it takes to "tickle" that LCD to make it write ASCII...
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
I am proud, but now let's get back to the topic and focus on solving the problem.Originally Posted by Dwayne
(We don't want this thread to end up with a 3 three figures number of posts and 80% of them being off topic.)
Last edited by NavMicroSystems; - 2nd August 2005 at 17:23.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Hi Ralph
Thanks for the reply, and catching my inverted chip select level.
I already had mode 5 in my code, and 4MHz as my clock speed (line 5), so yes, I have read the data sheets, but since I am a ME, rather than EE, there could be something that I am missing. I figured it would be obvious to someone with experience
Best reagrds
Richard
Richard,
are you saying it's working now?
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks