mr_kholl Posted November 8, 2007 Report Share Posted November 8, 2007 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' ;DYou 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. 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: Ops....something is wrong (note the weird spacing): LCD Sendmessage in MIOS Studio:"Testing MIDIBOX" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 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. 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:Ok2. LCD wiring Check:Ok3. CPU mode Check: 8bit mode as well4. 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: 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=7zf4Xy0EIss1ms:http://www.youtube.com/watch?v=4Dpj_ZRMtEk....Any help?Thanks a lot!Kholl. Quote Link to comment Share on other sites More sharing options...
TK. Posted November 10, 2007 Report Share Posted November 10, 2007 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->G1) 0x46 -> 0x47J->K2) 0x4a->0x4bL->M3) 0x4c->0x4dN->O4) 0x4e->0x4fR->S5) 0x52->0x53T->U6) 0x54->0x55Binary codes (only lower nibble)1) 0110 -> 01112) 1010 -> 10113) 1100 -> 11014) 1110 -> 11115) 0010 -> 00116) 0100 -> 0101Noticable similarities:When it happens, Bit #1, #2 and #3 don't change, only Bit #0 togglesIs this really deterministic? E.g., what happens when you are printing FGFGFGFGFGAnd what happens, when you are printing NGNGNGNGNG?does the same happen with fgfgfgfgfg and ngngngngng?Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
TK. Posted November 10, 2007 Report Share Posted November 10, 2007 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 delayBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
mr_kholl Posted November 13, 2007 Author Report Share Posted November 13, 2007 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" (Working, as well as "B", "C", "D", "E", "F",...etc....)"G" and "g" "O" and "o" (note the double space on "o")"V" and "v" (Aleatory spacing on "V")"u" and "s" (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:From the Application Notes (thanks SmashTV):I hope have posted nice tips to solve this 'mystery'.Thanks a lot.Kholl. Quote Link to comment Share on other sites More sharing options...
Sasha Posted November 13, 2007 Report Share Posted November 13, 2007 Those VFDs are just great! Where do you get them from? Also, how well is turned into white using filters? It is hard to see it on pictures as camera usually dont show proper light colours. Quote Link to comment Share on other sites More sharing options...
mr_kholl Posted November 13, 2007 Author Report Share Posted November 13, 2007 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)The white the filter is a kind of pink. You are right, you can't capture the true image of a display with a camera, it's really boring. Quote Link to comment Share on other sites More sharing options...
Sasha Posted November 13, 2007 Report Share Posted November 13, 2007 Khol, thanks for the pix, I`ve seen it on your website. Because cameras lies I wanted you to answer me verbally. How white is really white using these filters? I really see no diference on pictures. How things are in real? Quote Link to comment Share on other sites More sharing options...
mr_kholl Posted November 13, 2007 Author Report Share Posted November 13, 2007 Hi Sasha,Trust me, it's true white in real. The blue is awesome and the amber is perfect! Quote Link to comment Share on other sites More sharing options...
Sasha Posted November 13, 2007 Report Share Posted November 13, 2007 I trust you but I need you to tell me not the pix. :) Thanks Quote Link to comment Share on other sites More sharing options...
stryd_one Posted November 14, 2007 Report Share Posted November 14, 2007 You might want to sit down when you ask for pricing Sasha ;D Quote Link to comment Share on other sites More sharing options...
Sasha Posted November 14, 2007 Report Share Posted November 14, 2007 I`ve seen some prices around. I was sitting but still, It was hard to stay on chair. :-\ Quote Link to comment Share on other sites More sharing options...
TK. Posted November 15, 2007 Report Share Posted November 15, 2007 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. Quote Link to comment Share on other sites More sharing options...
mr_kholl Posted November 16, 2007 Author Report Share Posted November 16, 2007 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 SmashTVToday i'm reading your post, and see that you are in the right way too!! This is the cause of the problem: 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!! heheWell, i'm very happy to see MIOS running perfectly on the vfd: Now I see that LCD Benchmark was printing 1565 and not 5655 (or another wierd number)! The cable in direct way: Thank you very much for your support!!! congrats again! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.