View previous topic :: View next topic |
Author |
Message |
mr_tembo
Joined: 29 May 2006 Posts: 5
|
Posted: Wed Jun 14, 2006 1:18 pm Post subject: Newbie need help - EDB-Board and LCD |
|
|
Hi,
we had buy the "edb" board to learn some.
The Sample file we had flash, but the LCD show nothing.
We think we must change some settings in "Options/Compiler/LCD" , but we dont know what:
The source code show like this:
$regfile = "m32def.dat"
$crystal = 38400
Do
Locate 1 , 1 : Lcd "Hello World "
Loop
End
We do not use a m32 processor we have a m88. so please help us.
Greetings Michael |
|
Back to top |
|
|
Frankeman
Joined: 11 Aug 2004 Posts: 948 Location: the Netherlands
|
Posted: Wed Jun 14, 2006 3:50 pm Post subject: |
|
|
Hi and welcome to this friendly forum.
In your little test code there are four mistakes:
1 the regfile is wrong
2 the crystal frequency is wrong
3 the do..loop is not needed
4 the type and connection of the lcd is not given
Code: |
$regfile = "m88def.dat"
$crystal = 3840000
Config Lcdpin = Pin , Db4 = Porta.4 , Db5 = Porta.5 , Db6 = Porta.6 , Db7 = Porta.7 , E = Portc.7 , Rs = Portc.6
Config Lcd = 16 * 2
Locate 1 , 1
Lcd "Hello World "
End
|
You have to change the Config lines for the display type and connection.
Frank. |
|
Back to top |
|
|
mr_tembo
Joined: 29 May 2006 Posts: 5
|
Posted: Wed Jun 14, 2006 5:04 pm Post subject: |
|
|
Hi Frank,
thanks for your Reply. We had make exact your Sample. Now we got from the Compiler the following Message:
In Line 8 ("End")
Error 40 Variable can not be used with RESET (PORTA) ,in File...LCDTEST:BAS
Error 40 Variable can not be used with RESET (PORTA) ,in File...LCDTEST:BAS
Error 41 Variable can not be used with SET (PORTA) ,in File...LCDTEST:BAS
Error 41 Variable can not be used with SET (PORTA) ,in File...LCDTEST:BAS
----------------------------------------------------------------------------
$regfile = "m88def.dat"
$crystal = 3840000
Config Lcdpin = Pin , Db4 = Porta.4 , Db5 = Porta.5 , Db6 = Porta.6 , Db7 = Porta.7 , E = Portc.7 , Rs = Portc.6
Config Lcd = 16 * 2
Locate 1 , 1
Lcd "Hello World."
End 'end program
Whats he want from us.
Michael |
|
Back to top |
|
|
mr_tembo
Joined: 29 May 2006 Posts: 5
|
Posted: Wed Jun 14, 2006 6:22 pm Post subject: news to the problem |
|
|
i had change the $regfile to "m23def.dat", after this in the simulator its work and no errors, but not at the boartd (ok normal) if we change back to
$regfile = "m88def.dat"
we got all the errors again...
Please help us... |
|
Back to top |
|
|
Frankeman
Joined: 11 Aug 2004 Posts: 948 Location: the Netherlands
|
Posted: Wed Jun 14, 2006 9:46 pm Post subject: |
|
|
This is because the m88 has no port A.
Change the "Config lcdpin" so that the portpin assignments are correct for your case.
ps
With the $crystal you set the frequency which the m88 is running.
34800 is a common baudrate and not a frequency. |
|
Back to top |
|
|
mr_tembo
Joined: 29 May 2006 Posts: 5
|
Posted: Thu Jun 15, 2006 8:58 am Post subject: |
|
|
Strike, with this setting it work fine:
Config Lcdpin = Pin , Db4 = Portb.2 , Db5 = Portb.3 , Db6 = Portb.4 , Db7 = Portb.5 , E = Portb.1 , Rs = Portb.0
Thanks for your info.
greetings michael |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Jun 20, 2006 11:53 pm Post subject: |
|
|
Hi,
On the EDB CD you will find many samples.
And the LCD samples contain the proper CONFIG LCD lines. _________________ Mark |
|
Back to top |
|
|
|