MCU Destroyer,
as Dwayne already mentioned: it is most likely a timing problem.
And I doubt the 8bit Mode will solve that problem.
Could you tell us what brand and model the LCD is?
And could you also post your schematic and code?
MCU Destroyer,
as Dwayne already mentioned: it is most likely a timing problem.
And I doubt the 8bit Mode will solve that problem.
Could you tell us what brand and model the LCD is?
And could you also post your schematic and code?
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Hi,
From the manual:
PBP defaults to using a 4MHz oscillator.
Adding the statement DEFINE OSC 8 near the beginning of the PicBasic Pro program tells
PBP an 8MHz oscillator will be used instead. The acceptable oscillator definitions are:
3(3.58) 4 8 10 12 16 20 24 25 32 33 40
Telling PBP the oscillator frequency allows it to compensate and produce
the correct timing for COUNT, DEBUG, DEBUGIN, DTMFOUT, FREQOUT,
HPWM, HSERIN, HSEROUT, I2CREAD, I2CWRITE, LCDOUT, OWIN, OWOUT,
PAUSE, PAUSEUS, SERIN, SERIN2, SEROUT, SEROUT2, SHIFTIN,
SHIFTOUT, SOUND, XIN and XOUT.
* * *
Luciano
Please look my code:
++++++++++++++++++++++++++++++++++++++
define osc 20
Define LCD_DREG PORTA
Define LCD_DBIT 0
Define LCD_RSREG PORTE
Define LCD_RSBIT 0
Define LCD_EREG PORTE
Define LCD_EBIT 1
DEFINE LCD_RWREG PORTE
DEFINE LCD_RWBIT 2
ADCON1 = 7
Pause 3000
loop: Lcdout $fe, 1
Pause 9000
Lcdout "Hello"
Pause 9000
Lcdout $fe, $c0, "World"
Pause 9000
Goto loop
End
++++++++++++++++++++++++++++++++++++++++++++++++
LCD model: MT-16S2H (v.3) - this LCD full combine on conclusions with any LCD (for example Data Vision). And I use PIC16F877A, quartz 20 MHz (mode HS for PIC).
Probably really wash PIC works too quickly but how I then can increase a delay of commands for LCD? I have not found suitable commands...
From the PBP manual
5.39. LCDOUT
‘ Set command delay time in us
DEFINE LCD_COMMANDUS 2000
‘ Set data delay time in us
DEFINE LCD_DATAUS 50
Luciano
how about PORTA.4??? is this pin tie with pull-up resistor???
Not sure if PBP handle the R/W pin for you. Can you add a LOW PORTE.0 and post results...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Great thank All !
Now all worked.
When I use commands
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
and increased delays by 30 %, LCD has earned in a mode 4 bits.
But nevertheless it is possible in PBP to work with LCD in a mode 8 bits?
DEFINE LCD_BITS 8Originally Posted by MCU Destroyer
But why would you want to waste 4 Port Bits?
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Now I any more do not wish to spend all for nothing a bits of port. It simply question for the my general development - became already interestingly can-whether PBP work with LCD in a mode 8 bits.
Once again all many thanks !
Bookmarks