View previous topic :: View next topic |
Author |
Message |
Micha
Joined: 03 Oct 2006 Posts: 56
|
Posted: Fri Nov 11, 2016 2:26 pm Post subject: Upperline, Lowerline, Thirdline, Fourthline |
|
|
Hello
I want to write some code to control a display (4 lines á 16 chars, Textmode of ST7920 Controller).
The basic-command in the title-line send wrong control-commands to the display.
Now I want to redirect the called lib-routines to correct the ddram-address.
Know anybody, which labels will be called by this basic-commands?
Known examples:
InitLcd -> Label: _init_lcd in section [_init_lcd] [end]
Cls -> label _cls in Section [_cls[ [end]
LcdCmd -> Label _lcd_control in Section [_write_lcd] [end]
LcdData -> Label _write_lcd in Section [_write_lcd[ [end]
And here the unknown labels and sections:
Upperline -> Label ?
Lowerline -> Label ?
Thirdline -> Label ?
Fourthline -> Label ?
Can anybody help?
Thanks Micha.
(BASCOM-AVR version : 2.0.7.8 ) |
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
Posted: Fri Nov 11, 2016 6:04 pm Post subject: Search ST7920 |
|
|
Have you done a search? I see some Bascom-AVR examples for graphic- and charactermode.
Have fun
Ben Zijlstra |
|
Back to top |
|
|
Micha
Joined: 03 Oct 2006 Posts: 56
|
Posted: Fri Nov 11, 2016 6:30 pm Post subject: |
|
|
Yes I have searched, and in the web, too.
But I've not found any working code, which use the Bascom-Statements.
And a Bascom-Lib for the chip ST7920 does not exist.
The existing Bascom-Libs for Graphic-Display does not work with ST7920.
So I try to write my own code as lib.
How can I correct the DDRAM address in the Lib?
Bascom sends 0x80, 0xC0, 0x90, 0xD0 for the 4 lines in this order.
But I need the following codes: 0x80, 0x90, 0x88, 0x98
You can see, only the address 0x80 and 0x90 are identical.
And so I can use only the first and the second line with the statements Upperline and Thirdline.
And the next problem is the Statement HOME with the optional Parameter Upper, Lower, Third and Fourth
This Statements I don't have checked. |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Fri Nov 11, 2016 11:02 pm Post subject: |
|
|
Micha wrote: | But I've not found any working code, which use the Bascom-Statements. | SAMPLES\LCDTEXT\LCD.bas uses lowerline.
Quote: | And a Bascom-Lib for the chip ST7920 does not exist. | It surely would be welcomed.
Quote: | So I try to write my own code as lib. | Considering the sort of questions you've asked, you're miles and miles away from achieving that.
Quote: | And so I can use only the first and the second line with the statements Upperline and Thirdline. |
Quote: | And the next problem is the Statement HOME with the optional Parameter Upper, Lower, Third and Fourth | You did notice that upper, lower, home a.s.o. is only for text displays, while the ST7920 is a graphic display? |
|
Back to top |
|
|
Micha
Joined: 03 Oct 2006 Posts: 56
|
Posted: Sat Nov 12, 2016 9:25 am Post subject: |
|
|
Hi,
yes, I know, that the ST7920 Chip is used for Graphic-Displays. But the Display GLCD12864 can Textmode, too.
I write my code Step by Step. The Destnation is a Lib, that can be used to control the Display in the Textmode and in Graphicmode.
And I want use the Statements Lowerline, Upperline, Thirdline and Fourthline to set Cursor in the Textmode.
For the Graphicmode I want to use the Statement LCDat.
My problem is, that the statements to set the cursor in Textmode send wrong command bytes to the display. (Read thirst post at the top).
I want to set or correct the command bytes, before they will be send to the display. Ant I hope it is possible like Statement "CLS", that will call in lib the Label "_cls". Or the basic statement "locate" that calls in the lib the label "_locatey".
My question is simpel. What is the name of the label in the lib that will be called, then I use for example Lowerline in basic-code.
And how to use the statements (Sampes\Lcd.bas) is for me clear.
Thanks for your help.
Perhaps the Programmer of the BascomAVR hnows the labels they I can use.
Micha. |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Sat Nov 12, 2016 11:18 am Post subject: |
|
|
sorry Micha
but You have a bad method
ex:
You ave many displays available and working with Bascom try to choose a display working with it. Why spend money for nothing ?
Misters Mrshilov, Ben, hiptnik, six1 and ..... did and share a big job for a lot of display.
So before staring a project I write on a paper
what I want do do
what I need as hardware (sensors, button display etc..)
What I need as I/0
What is my budget ?
What is my time for it ?
what is similar project chared ?
What compiler I will use for it and his capabilities ? and for what platform: PC, Raspberry, Arduino other...
That is "bon sens" (in french sorry) because I'm not very clever and I have not too much time to spend.
I hope you understand this post, it is not an offence, it is a old man trying to help others.
JP |
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
Posted: Sat Nov 12, 2016 1:37 pm Post subject: Another solution |
|
|
Found another link with ST7920 Bascom code
http://bascomavr.3bb.ru/viewtopic.php?id=736
To be honest I don't know what the problem is. You want to use upperline, secondline, home, cls I understand. Why not make your own routines and call them
St7920_upperline
St7920_cls
St7920_home
Etc
It is what JP states, if you want the regular commands you have to pick a HD44780 compatible display.
Have fun
Ben Zijlstra |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|