Jump to content

GLCD for Sample controller project


mr_DK
 Share

Recommended Posts

when I want to execute a make, my cmd section always says:

sh is not recognized as a internal or external program, batchfile,... (Sorry in my cmd it's in dutch, so I tried to translate the message)

I'm pretty sure all the PATH references are done well, I have the sh.exe file in the bin directory of the msys so It's installed correctly...

Thanks,

Hans

Link to comment
Share on other sites

Did you install msys to the default location?

make and sh should be in the same location (C:/msys/1.0/bin). Obviously, make is running, so it is found in the path. but sh not? that is strange. I am wondering if you've changed the default installation location to somewhere special (bad), and then copy/pasted the command to copy the new make version to the correct location (good), and copy/pasted the PATH from the wiki which points to that location (good). This would allow make to run, but not much else ;)

Also perhaps you are actually successfully running some other copy of make from your HDD. If you pasted the path from the wiki that would be unlikely.

A few tests, which will give us more insight:

Go 'start...run...' and type "cmd" (without the quotes) and hit enter.

Type in each of these commands and hit enter after each one, please copy and paste the results into a reply Edit: and i do mean, copy and paste, please don't type it! If you don't know how to copy/paste in a command prompt, google 'dos quickedit' (without the quotes))

sh --version

make --version

sed --version

sdcc --version

set MIOS

PATH

(You can edit the output from PATH if you are really sensitive about it, but it shouldn't be anything secret I would think, and it's best to leave it exactly as-is, to avoid errors)

Good luck!

Link to comment
Share on other sites

[b]sh --version[/b]
GNU bash, version 2.04.0(1)-release (i686-pc-msys)
Copyright 1999 Free Software Foundation, Inc.

[b]make --version[/b]
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-pc-mingw32

[b]sed --version[/b]
GNU sed version 3.02
Copyright (C) 1998 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.

[b]sdcc --version[/b]
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.6.0 #4
309 (Jul 28 2006) (MINGW32)

The set MIOS has a positive result, but I have to be really honest with you, I installed the msys and minGW into the program files and the base package of mios is in the directory d:\midibox\mios_base_v1_0b/mios_base_v1_0b
C:\Documents and Settings\Hans Cornelis>set MIOS
MIOS_BIN_PATH=d:\midibox\mios_base_v1_0b\mios_base_v1_0b\bin
MIOS_PATH=d:\midibox\mios_base_v1_0b\mios_base_v1_0b

C:\Documents and Settings\Hans Cornelis>set path
Path="c:\Program Files\msys\1.0\bin";"c:\Program Files\MinGW\bin";"c:\Program Fi
les\gputils\bin";"c:\Program Files\gputils\bin";"c:\Program Files\SDCC"\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

I hope it's a version problem, otherwise I must reinstall all the software. Sorry I didn't install it in the standard directory, I like a little order on my computer and I always set directories of software into the program files... I did not concerned the consequences

Best

Link to comment
Share on other sites

Hi.

All of your versions look OK. I am using a newer version of SDCC but that shouldn't matter as you are not even getting to that bit  :)

The only thing I did notice is that I believe that quotes are not necessary within path statements as semicolons are used as seperators so the quotes could be causing something strange? Try removing them and see what happens....

Cheers

Phil

Link to comment
Share on other sites

Heheh that's a common mistake.... I made it myself! :D

I like to order my data well too, but a lot of these kind of tools have issues with long file names. That is why make (which is the correct version as are all the other tools) can't find sh.... And it's definitely why the quickstart page says "Install using the defaults." :D LOL (don't sweat it, I'm just having fun w/ you)

Unfortunately, and yes it is ugly and disorganised and also annoyed me, it may have to go in the root with a short file name path (no spaces).

If you feel like experimenting, you may like to try converting your paths in PATh and the MIOS vars, to short fie names, eg:

c:\Program Files\msys\1.0\bin -> c:\Progra~1\msys\1.0\bin

etc.

To be honest, I would recommend against it.... Using long file names (even faking the short one) turned out to be a lot of hassle for me. New versions of the tools can (and did) mysteriously break... It's just not worth it.

If your OCD is just killing you, maybe make a c:/dev directory and put it all in there or something :/

sorry for the bad news!

Edit: beaten. And ditch the quotes in your path!

Link to comment
Share on other sites

Try removing them and see what happens....

Life can sometimes be easy  8) windows put them there when you use the Tab key to enter long directory names.

The GLCD takes every place very nice, I tried to give some othe positions and it works very nice.

I looked at the clear_LCD function in app_lcd.inc, I think were I need to change things, I experimented with some other numbers and I saw changes in the snow area. But it only got smaller  :P

;; clear the first 32*64 bytes
	;; use MIOS_GLCD_GCURSOR_X and _Y as counter register
	SET_BSR MIOS_GLCD_GCURSOR_Y	; 64 lines to clear
	clrf	MIOS_GLCD_GCURSOR_Y, BANKED
USER_LCD_ClearOuterLoop
	SET_BSR MIOS_GLCD_GCURSOR_X	; 32 bytes to clear
	clrf	MIOS_GLCD_GCURSOR_X, BANKED

USER_LCD_ClearInnerLoop
	movlw	0x00
	rcall	USER_LCD_Data
	movlw	0xc0		; write and increment
	rcall	USER_LCD_Cmd
	incf	MIOS_GLCD_GCURSOR_X, F, BANKED
	BRA_IFCLR MIOS_GLCD_GCURSOR_X, 5, BANKED, USER_LCD_ClearInnerLoop

	clrf	MIOS_GLCD_GCURSOR_X, BANKED

	incf	MIOS_GLCD_GCURSOR_Y, F, BANKED
	BRA_IFCLR MIOS_GLCD_GCURSOR_Y, 6, BANKED, USER_LCD_ClearOuterLoop

I changed the second flag of both BRA_IFCLR functions. But to be real honest I'm not really sure what this step does.

Any hints?

Thanks, we're almost there

Link to comment
Share on other sites

Right, I will try to describe what this section of the USER_LCD_Clear function does.

First it clears the GCURSOR_Y this is the beginning of the Outer loop then it clears the GCURSOR_X register and it sends a command to the display (0x24) to set the set the display address pointer to X=0 and Y=0.

Then you have the InnerLoop where it sends 0x0 to to the display followed by a command 0xc0 which tells the display to write the data at the current cursor position. It then increments the graphic cursor X. the first BRA_IFCLR then checks the X cursor and if bit 5 is not set (X is less than 32) then it loops.

Once X=32, it increments Y and checks that it is less than 64, if so it goes back to Outer loop and starts again. If not it sets the cursor back to 0/0 and returns.

As the second parameter of BRA_IFCLR is a bit then it cannot be larger than 7 which could explain why the box was getting smaller if you increased it too much. I would try changing the second one from 6 to 7 as this checks that it is lower than 128....

Cheers

Phil

Link to comment
Share on other sites

Thanks that explained a lot  8)

This is my first (probably a very small and with lots and lots of help) contribution to the MidiBox project,

It now supports a GLCD up to 240*128 pixels!!! :D The code needs to be set as follows:

USER_LCD_ClearInnerLoop
	movlw	0x00
	rcall	USER_LCD_Data
	movlw	0xc0		; write and increment
	rcall	USER_LCD_Cmd
	incf	MIOS_GLCD_GCURSOR_X, F, BANKED
	BRA_IFCLR MIOS_GLCD_GCURSOR_X, 7, BANKED, USER_LCD_ClearInnerLoop

	clrf	MIOS_GLCD_GCURSOR_X, BANKED

	incf	MIOS_GLCD_GCURSOR_Y, F, BANKED
	BRA_IFCLR MIOS_GLCD_GCURSOR_Y, 7, BANKED, USER_LCD_ClearOuterLoop

both BRA_IFCLR functions not to be set at 7 and then it clears out the whole screen.

I don't have words to thank you for your help, it gives a very satisfactional feeling.

Regards

Link to comment
Share on other sites

Thats great, isn't it a wonderful feeling when it finally works ?  8)

The only problem with these things is I tend to get more satisfaction out of getting individual bits of a project working than I do actually finishing the project as a whole, this probably explains why I have so many bits of unfinished projects lying around  :)

Phil

Link to comment
Share on other sites

Now this is really good news! (And I would like to see a picture of that nice display fully working in all its beauty  ;))

I understand that you have the display running in portrait mode. There is another driver for the T6963C in landscape mode (and as Stryd mentioned earlier, it takes more processing power away from the PIC as everything has to be rotated internally by 90 degrees first). Still, would you like to try your code modifications on that driver, too, and report how that performs? Like you, I would not mind dedicating a PIC solely to the task of driving a display, but I'd rather know for sure that it can work before actually spending money.

Best regards, ilmenator

Link to comment
Share on other sites

Hey again,

I did some changes to the horizontal driver as well, and it also seems to work very nice.

Like you, I would not mind dedicating a PIC solely to the task of driving a display, but I'd rather know for sure that it can work before actually spending money.

There is a SMD controller available from electronic assembly (my LCD is from them) which takes all the mathematical work on itself, it's designed to work with the T6963 and it gives some nice graphical possibilities. Maybe in the future I can experiment with it a little and may be integrate it in the Midibox so that the core modules do what they do best (working with MIDI) and the EA IC does the graphical work for optimal speed of both components.

The dataSheet of this IC can be found at:

http://www.lcd-module.com/eng/pdf/grafik/ic6963e.pdf

But that's some future music, I'll first try to get my project set up and see how it reacts.

Another thanks to Stryd_one and Philtaylor for their extreme good help!

Enjoy the pictures!

BTW it's still much nicer than on the illustrations  8) what a hot blue it is...

DSC_4275.JPG

DSC_4275.JPG

Link to comment
Share on other sites

And the one in Portrait mode

btw, I only seem to have a small problem using GLCD_FONT_NORMAL or GLCD_FONT_SMALL

I tried it in this piece of code:

MIOS_GLCD_FontInit(MIOS_GLCD_FONT);    

  MIOS_GLCD_GCursorSet(  4, 5);
  MIOS_LCD_PrintCString("            Sample controller           ");

  MIOS_GLCD_GCursorSet( 50,9);
  MIOS_LCD_PrintCString(" powered by  ");


  // switch to big font (part of glcd_font package)
  MIOS_GLCD_FontInit(GLCD_FONT_BIG);

  MIOS_GLCD_GCursorSet(128, 8);
  MIOS_LCD_PrintCString("MIOS");

When I tried to change the GLCD_FONT_BIG into the small or normall, my make process gave an error.... I hope I'll find that out soon...

Best!

DSC_4277.JPG

DSC_4277.JPG

Link to comment
Share on other sites

Indeed you're right,

Sorry for the late reply!

So here's the problem, the code is as follows:

void DISPLAY_Init(void) __wparam
{
  MIOS_LCD_Clear();
  MIOS_GLCD_FontInit(MIOS_GLCD_FONT);
  MIOS_GLCD_GCursorSet( 10,6);
  MIOS_LCD_PrintCString("Sample Controller");
  MIOS_GLCD_GCursorSet(10,10);
  MIOS_LCD_PrintCString("    Powered by   ");
  


  // switch to big font (part of glcd_font package)
  MIOS_GLCD_FontInit(GLCD_FONT_BIG);

  MIOS_GLCD_GCursorSet(33,15);
  MIOS_LCD_PrintCString("MIOS");
  
  MIOS_GLCD_FontInit(GLCD_FONT_SMALL);
    MIOS_GLCD_GCursorSet(20,28);
  MIOS_LCD_PrintCString("Hans Cornelis");

}
and the make result is as follows:
rm -rf _output/*
rm -rf _output
rm -rf *.cod *.map *.lst
rm -rf *.hex
mkdir -p _output
sh d:\midibox\mios_base_v1_0b\mios_base_v1_0b\bin/mios-gpasm -c -p p18f452 -I./s
rc -I d:\midibox\mios_base_v1_0b\mios_base_v1_0b/include/asm -I d:\midibox\mios_
base_v1_0b\mios_base_v1_0b/include/share -I d:\midibox\mios_base_v1_0b\mios_base
_v1_0b/modules/app_lcd/t6963c_v -I d:\midibox\mios_base_v1_0b\mios_base_v1_0b/mo
dules/glcd_font -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I d:\
midibox\mios_base_v1_0b\mios_base_v1_0b/modules/mios_wrapper d:\midibox\mios_bas
e_v1_0b\mios_base_v1_0b/modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_w
rapper.o
sh d:\midibox\mios_base_v1_0b\mios_base_v1_0b\bin/mios-gpasm -c -p p18f452 -I./s
rc -I d:\midibox\mios_base_v1_0b\mios_base_v1_0b/include/asm -I d:\midibox\mios_
base_v1_0b\mios_base_v1_0b/include/share -I d:\midibox\mios_base_v1_0b\mios_base
_v1_0b/modules/app_lcd/t6963c_v -I d:\midibox\mios_base_v1_0b\mios_base_v1_0b/mo
dules/glcd_font -DDEBUG_MODE=0   d:\midibox\mios_base_v1_0b\mios_base_v1_0b/modu
les/app_lcd/t6963c_v/app_lcd.asm -o _output/app_lcd.o
sh d:\midibox\mios_base_v1_0b\mios_base_v1_0b\bin/mios-sdcc -c -mpic16 -p18f452
--fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --oba
nksel=2  -I./src -I d:\midibox\mios_base_v1_0b\mios_base_v1_0b/include/c -I d:\m
idibox\mios_base_v1_0b\mios_base_v1_0b/include/share -I d:\midibox\mios_base_v1_
0b\mios_base_v1_0b/modules/glcd_font -DDEBUG_MODE=0  main.c -o _output/main.o
d:\midibox\mios_base_v1_0b\mios_base_v1_0b\bin/mios-gpasm modifies _output/main.
asm, result in _output/main__mios-gpasm-tmp.asm
sh d:\midibox\mios_base_v1_0b\mios_base_v1_0b\bin/mios-gpasm -c -p p18f452 -I./s
rc -I d:\midibox\mios_base_v1_0b\mios_base_v1_0b/include/asm -I d:\midibox\mios_
base_v1_0b\mios_base_v1_0b/include/share -I d:\midibox\mios_base_v1_0b\mios_base
_v1_0b/modules/app_lcd/t6963c_v -I d:\midibox\mios_base_v1_0b\mios_base_v1_0b/mo
dules/glcd_font -DDEBUG_MODE=0   d:\midibox\mios_base_v1_0b\mios_base_v1_0b/modu
les/glcd_font/glcd_font_big.asm -o _output/glcd_font_big.o
sh d:\midibox\mios_base_v1_0b\mios_base_v1_0b\bin/mios-gpasm -c -p p18f452 -I./s
rc -I d:\midibox\mios_base_v1_0b\mios_base_v1_0b/include/asm -I d:\midibox\mios_
base_v1_0b\mios_base_v1_0b/include/share -I d:\midibox\mios_base_v1_0b\mios_base
_v1_0b/modules/app_lcd/t6963c_v -I d:\midibox\mios_base_v1_0b\mios_base_v1_0b/mo
dules/glcd_font -DDEBUG_MODE=0   d:\midibox\mios_base_v1_0b\mios_base_v1_0b/modu
les/glcd_font/glcd_font_knob_icons.asm -o _output/glcd_font_knob_icons.o
gplink -s d:\midibox\mios_base_v1_0b\mios_base_v1_0b/etc/lkr/p18f452.lkr -m -o p
roject.hex  d:\midibox\mios_base_v1_0b\mios_base_v1_0b/lib/libsdcc.lib d:\midibo
x\mios_base_v1_0b\mios_base_v1_0b/lib/pic18f452.lib _output/mios_wrapper.o _outp
ut/app_lcd.o _output/main.o _output/glcd_font_big.o _output/glcd_font_knob_icons
.o
error: missing definition for symbol "_GLCD_FONT_SMALL", required by "_output/ma
in.o"
make: *** [project.hex] Error 1

I know it's a lot of directories, sorry for that. It's just so strange that it takes the MIOS_GLCD_FONT, the _GLCD_FONT_SMALL  and all the other fonts give me an error.

Best!

Hans

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...