Jump to content

Testing MIOS on 40x2 VFD...** SOLVED **


mr_kholl
 Share

Recommended Posts

Hi!

This is my first attempt into the Midibox world.

I have been working with displays for a long time, I really love it, I'm a 'display addicted'  ;D

You can see some photos of my 'babies' here: http://www.modtv.com.br/mr_kholl/kholl_displays.htm

(Noritake's Dot Matrix VFD 258x128 and 128x32, Blue HD44780's 20x4 and 8x2, Blue T6963's 240x128 and Planar's EL 240x128 (my favourite)

--------------------------------------------------------------------------------

I have plans to build a LC project, and since it's my first Midibox project, i decided to use two 40x2 Character VFD's, so, next time I will try to use dot matrix displays.

midibox_kholl000_mark.jpg

You can see the two VFD's inside the red mark (PS: All images are thumbnails.).

According to Noritake, the U-Series is a LCD drop replacement, it means that you can replace your lcd for this vfd without any changes in your code. In fact it's works well, the functions are quite compatible.

Well, I made the wiring for the core module and did the first test:

midibox_vfd4.jpg

Ops....something is wrong (note the weird spacing):

midibox_vfd1.jpg

LCD Sendmessage in MIOS Studio:

"Testing MIDIBOX"

midibox_vfd2.jpg

"ABCDEFGHIJKLMNOPQRSTUVWXYZ"

midibox_vfd8.jpg

I decided to made the wiring for the PC Parallel port just to test if the VFD is a really true replacement.

Well, started Smartie, picked the HD44780 driver, and voilá, worked perfectly! (including animations), note that it ran without any special config, just plug and play.

midibox_vfd6.jpg

I have been talking with SmashTV, jimp, ultra, fossi.bs, SoundDuke, seppoman (sorry if i forgot someone) about this problem in the chat, and I would like to thank them very much for the support!

After several suggestions I did the tests below:

1. Core assembly Check:

Ok

2. LCD wiring Check:

Ok

3. CPU mode Check:

8bit mode as well

4. LCD Init sequence Check:

It's Original LCD Init code from mios_clcd.inc

	movlw	0x08			; Display Off
	rcall	MIOS_CLCD_Cmd
	movlw	0x0c			; Display On
	rcall	MIOS_CLCD_Cmd
	movlw	0x06			; Entry Mode
	rcall	MIOS_CLCD_Cmd
	movlw	0x01			; Clear Display
	call	MIOS_CLCD_Cmd
	bcf	MIOS_LCD_TIMEOUT1, 7, BANKED	; everything ok, make sure that LCD_TIMEOUT, bit 7 is cleared

	movlw	0x38					; select 8-bit interface again
	BIFSET	MIOS_CLCD_PIN_E, 7, BANKED, movlw 0x28	; select 4-bit interface again
	rcall	MIOS_CLCD_Cmd
	movlw	0x0c
	rcall	MIOS_CLCD_Cmd
	movlw	0x00			; set cursor to zero pos
	rgoto	MIOS_CLCD_CursorSet
According to a doc from Noritake it's the suggested Init procedure: vfd_init_procedure.JPG So, I changed the original code and recompiled the MIOS:
movlw 260 ; 260 ms delay
call MIOS_Delay

movlw 0x38 ; select 8-bit interface again
rcall MIOS_CLCD_Cmd

movlw 0x38 ; select 8-bit interface again
rcall MIOS_CLCD_Cmd

movlw 0x02 ; brightness 50%
rcall MIOS_CLCD_Data

movlw 0x08 ; Display Off
rcall MIOS_CLCD_Cmd

movlw 0x01 ; Clear Display
call MIOS_CLCD_Cmd

movlw 2 ; 2 ms delay
call MIOS_Delay

movlw 0x0c ; Display On
rcall MIOS_CLCD_Cmd
movlw 0x06 ; Entry Mode
rcall MIOS_CLCD_Cmd
Guess what?? nothing happened, still same spacing problem, note that it's my first try in MIOS, so I changed the brightness param to 50% just to check if I was changing in the correct place, in fact, the brightness param worked! 5. lcd_interconnections_test_v1 application Test: Pins about 4.58v 6. lcd_benchmark application Test: Result:
565 * 8 * 100ns 
or 
565? * 8 * 100ns 

PS: the values wasn't clear because the position/spacing problem.

7. PrintChar test (One character per time):

I filled the grid with a sequence of PrintChar command, from 'A' to 'Z' character using 1ms and 400ms of delay...the result is still weird!

Checkout the videos:

400ms:

http://www.youtube.com/watch?v=7zf4Xy0EIss

1ms:

http://www.youtube.com/watch?v=4Dpj_ZRMtEk

....

Any help?

Thanks a lot!

Kholl.

Link to comment
Share on other sites

This requires some more experiments in order to understand, what is going on.

Some thoughts:

spaces will be inserted after (or before?) the same character combination independent from the delay.

ASCII codes:

F->G

1) 0x46 -> 0x47

J->K

2) 0x4a->0x4b

L->M

3) 0x4c->0x4d

N->O

4) 0x4e->0x4f

R->S

5) 0x52->0x53

T->U

6) 0x54->0x55

Binary codes (only lower nibble)

1) 0110 -> 0111

2) 1010 -> 1011

3) 1100 -> 1101

4) 1110 -> 1111

5) 0010 -> 0011

6) 0100 -> 0101

Noticable similarities:

When it happens, Bit #1, #2 and #3 don't change, only Bit #0 toggles

Is this really deterministic? E.g., what happens when you are printing FGFGFGFGFG

And what happens, when you are printing NGNGNGNGNG?

does the same happen with fgfgfgfgfg and ngngngngng?

Best Regards, Thorsten.

Link to comment
Share on other sites

another thought: what is the required setup time between data port and enable signal?

Does it work better when some NOPs are inserted between the access to data port (movwf  USER_LCD_LAT_D) and busy bit polling routine?

I guess, that your PC toggles the enable line with a much higher delay

Best Regards, Thorsten.

Link to comment
Share on other sites

Hey TK,

Firstly, thank you very much for your attention and congratulations for the outstanding MIDIBOX!!!

Well, I think you got the point!

The spacing (definitely before) occurs with the characters: "G", "K", "M", "N", "O", "S", "U", "W", "Y", "3", "5", "7", "9", "^", "_", "-", "+", "=", "{", "}", "|", ";", "'", ">", "?"(two spaces) and "/". The others characters works perfectly.

Note some pics:

PS: Sequence of 20 characters

"A" and "a"

midibox_vfd9.jpg midibox_vfd10.jpg

(Working, as well as "B", "C", "D", "E", "F",...etc....)

"G" and "g"

midibox_vfd11.jpg midibox_vfd12.jpg

"O" and "o"

midibox_vfd16.jpg midibox_vfd17.jpg

(note the double space on "o")

"V" and "v"

midibox_vfd14.jpg midibox_vfd15.jpg

(Aleatory spacing on "V")

"u" and "s"

midibox_vfd18.jpg midibox_vfd19.jpg

(I sent only 20 characters as well as the others, but these are duplicating)

I placed NOPs according your instructions, but nothing happened.

Timing info:

From the Datasheet:

midibox_vfd_timing.jpg

From the Application Notes (thanks SmashTV):

midibox_vfd_timing2.jpg

I hope have posted nice tips to solve this 'mystery'.

Thanks a lot.

Kholl.

Link to comment
Share on other sites

Hi Sasha,

These are the Noritake's international contacts. Note that there's no info about Brazil (my country), but in fact they have a representative sales here, and I got my displays from this office here in Sao Paulo, so, the best thing to do is send an e-mail and ask for your country.

I use PSC's optical filters. You can convert VF displays from green to white, blue, amber, red, yellow, etc....just need to apply the correct filter.

I have 1 blue, 1 amber and 2 white (which in my option is the same effect)

nanonew008.jpg

The white the filter is a kind of pink.

nanovfd17.jpg nanovfd18.jpg

You are right, you can't capture the true image of a display with a camera, it's really boring.

Link to comment
Share on other sites

The setup/hold timings are ok, and based on your new experiments, I would say that it really looks like a crosstalk issue between a single data and conrol line, especially because most of the failures are reproducible, but some are sporadic. Maybe it's caused inside the connector that you are using for the ribbon cable?

You tested the LCD with "Smartie" - did you connect the LCD with the same cable to the PC? Would it be possible to check this?

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi TK,

You are right again!! the problem was the cable!!

I was talking with SmashTV on Wednesday, and he suggested to forget the bridge which i've made and make another cable, direct way: core -> display, exactly what you is suggesting now, make the same way which I did about the smartie.

So yesterday i made it and BINGO!! worked!! heheheh....i tried to tell him about it, but only SoundDuke was active in the chat and he knew this news! thank you very much SmashTV

Today i'm reading your post, and see that you are in the right way too!!

This is the cause of the problem:

midibox_vfd23.jpg

I made this bridge to make it easy to connect the two displays required by LC app, but it's seems like the display doesn't like this!! hehe

Well, i'm very happy to see  MIOS running perfectly on the vfd:

midibox_vfd20.jpg

midibox_vfd21.jpg

Now I see that LCD Benchmark was printing 1565 and not 5655 (or another wierd number)!

midibox_vfd24.jpg

The cable in direct way:

midibox_vfd22.jpg

Thank you very much for your support!!! congrats again!

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...