# LCD Character Scrambling - Futaba VFD M402SD10FJ \<-\> Core32

**URL:** <https://forum.midibox.org/t/lcd-character-scrambling-futaba-vfd-m402sd10fj-core32/14707>\
**Category:** Testing/Troubleshooting\
**Created:** [November 15, 2010, 11:28am UTC](https://forum.midibox.org/t/lcd-character-scrambling-futaba-vfd-m402sd10fj-core32/14707 "2010-11-15T11:28:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hawkeye](https://forum.midibox.org/user_avatar/forum.midibox.org/hawkeye/32/223_2.png) [@Hawkeye](https://forum.midibox.org/u/Hawkeye)\
**Post date:** [November 15, 2010, 11:28am UTC](https://forum.midibox.org/t/lcd-character-scrambling-futaba-vfd-m402sd10fj-core32/14707/1 "2010-11-15T11:28:54Z")

</div>

Hola,

[http://discourse.midibox.org/t/topic/14528](http://discourse.midibox.org/t/topic/14528)

The cabling is fine, i built another, shorter cable with the exact same problems.

Trying to hack things, I then installed the Windows-based dev toolchain, which works fine (respect on the code documentation, svn structure and nice build system!). When I build an MBSeqV4 or the tutorial #20 (lcd test) and I power-cycle the Core, the display stays dark (the mbseq app runs though, it can be queried via mios studio).

When I donÂ´t power-cycle after flashing tutorial #20 from a TK-built SeqV4, the display stays on and shows increased garbage - it creates “animated” strange looking special characters…

There seems to be a difference between my build and TKs build… when I build apps, things are getting much worse… ☹ - are the any defines/environment variables which i am missing (i set clcd as lcd environment variable and the rest of the environment variables from the toolchain documentation).

Edit: I suspect some timing issues… could it be that my toolchain (gcc 4.4 based) produces differently optimized code than TKs variant which is faster or slower leading to different behaviour on the vfd? I saw some loop-based sleep code and maybe that got optimized away?

Thx for help!

Peter

---

<div class="post-metadata">

**Author:** ![Hawkeye](https://forum.midibox.org/user_avatar/forum.midibox.org/hawkeye/32/223_2.png) [@Hawkeye](https://forum.midibox.org/u/Hawkeye)\
**Post date:** [November 15, 2010, 5:04pm UTC](https://forum.midibox.org/t/lcd-character-scrambling-futaba-vfd-m402sd10fj-core32/14707/2 "2010-11-15T17:04:28Z")

</div>

Please forgive my unstructured initial problem report. IÂ´ve got 2 issues:

1. some, but not all characters are replaced by alphabetically close characters (TKs MBSeq Build) - i wanted to fix this with a char replacement hook, but then this happened:

2. builds from my toolchain behave differently than TKs builds - my display stays dark after a power cycle

Thanks and sorry for double posting.

---

<div class="post-metadata">

**Author:** ![Hawkeye](https://forum.midibox.org/user_avatar/forum.midibox.org/hawkeye/32/223_2.png) [@Hawkeye](https://forum.midibox.org/u/Hawkeye)\
**Post date:** [November 16, 2010, 7:55pm UTC](https://forum.midibox.org/t/lcd-character-scrambling-futaba-vfd-m402sd10fj-core32/14707/3 "2010-11-16T19:55:43Z")

</div>

to keep you up-to-speed, I made some progress on the toolchain side… managed to get it up and running under FreeBSD, which i prefer to code on - now this toolchain uses the gcc 4.3 compiler and i am able to get the scrambled screen outputs again instead of a blank screen - looking into app\_lcd timings and if adjusting them does not work, will try out a character replacement hook… I would bet, that TKs build toolchain also still uses gcc 4.3 🙂

btw., when attaching a normal lcd, the outputs are fine, so no problem on the core32 side of things… this vfd surely is a bit bitchy ;-)- but what i love in this vfd is that there is no afterglow, new characters are displayed instantly - comparing to my 9US$ LCD, this is better by magnitudes…

---

<div class="post-metadata">

**Author:** ![Hawkeye](https://forum.midibox.org/user_avatar/forum.midibox.org/hawkeye/32/223_2.png) [@Hawkeye](https://forum.midibox.org/u/Hawkeye)\
**Post date:** [November 16, 2010, 8:50pm UTC](https://forum.midibox.org/t/lcd-character-scrambling-futaba-vfd-m402sd10fj-core32/14707/4 "2010-11-16T20:50:27Z")

</div>

ok, further investigation - the problem occurs reproducably in 8-bit data transfer mode for all characters

```
where D1=0 and D0=1, so to say A, E, I, M ... 

they are replaced by the predecessors 

where D1=0 and D0=0, which are @, D, H, L...

```

ThatÂ´s why a character replacement hook wonÂ´t work… i am not able to send any char in 8-bit mode with d1=0, d0=1… that looks a lot like a bug on the vfd side… i have also switched cables and measured for unwanted bridges twice…

Now investigating 4-bit transfer mode, where d4-d7 are used…

---

<div class="post-metadata">

**Author:** ![nILS](https://forum.midibox.org/user_avatar/forum.midibox.org/nils/32/19_2.png) [@nILS](https://forum.midibox.org/u/nILS)\
**Post date:** [November 16, 2010, 9:20pm UTC](https://forum.midibox.org/t/lcd-character-scrambling-futaba-vfd-m402sd10fj-core32/14707/5 "2010-11-16T21:20:11Z")

</div>

Does this only happen when D1 is low or is D0 simple always low? Either way this points towards a short on the hardware side of things.

---

<div class="post-metadata">

**Author:** ![Hawkeye](https://forum.midibox.org/user_avatar/forum.midibox.org/hawkeye/32/223_2.png) [@Hawkeye](https://forum.midibox.org/u/Hawkeye)\
**Post date:** [November 16, 2010, 9:25pm UTC](https://forum.midibox.org/t/lcd-character-scrambling-futaba-vfd-m402sd10fj-core32/14707/6 "2010-11-16T21:25:54Z")

</div>

thiz only happenz when D1 is low… i am able to display a “C” for example (D1: 1 D0: 1) - i measured cables and the vfd pins, no shortage…

But… I have the feeling that 4-bit mode will help. In the tech docu the motorola mode is only depicted in 4 bit mode, if that is true, those suckers… ;-)… if it works, ofc i will offer a clcd4bit driver for TK.

The pinsavingz would enable the core32 to drive 3 CLCDs right? 😉

Plz get back to your diploma thesis so we can meet in Munich and have a beer 😉

---

<div class="post-metadata">

**Author:** ![Hawkeye](https://forum.midibox.org/user_avatar/forum.midibox.org/hawkeye/32/223_2.png) [@Hawkeye](https://forum.midibox.org/u/Hawkeye)\
**Post date:** [November 16, 2010, 10:14pm UTC](https://forum.midibox.org/t/lcd-character-scrambling-futaba-vfd-m402sd10fj-core32/14707/7 "2010-11-16T22:14:21Z")

</div>

:frantics: YESSS! it workz :frantics::sorcerer:

haz i earned coder status nao? :rolleyes:

if there is interest - i could either create a clcd4bit module or as there are only a few lines changed handle it with the preprocessor and check via #ifdef CLCD\_4BIT …

svn diff and picture of working vfd is attached

[app\_lcd\_diff.txt](\< _ **base\_url** _ \>/applications/core/interface/file/attachment.php?id=8007)

 ![post-7895-052275500 1289946857_thumb.jpg](https://forum.midibox.org/uploads/default/original/3X/e/7/e7df50b440fd560784d402d021233a089d705b3e.jpeg)

---

<div class="post-metadata">

**Author:** ![nILS](https://forum.midibox.org/user_avatar/forum.midibox.org/nils/32/19_2.png) [@nILS](https://forum.midibox.org/u/nILS)\
**Post date:** [November 17, 2010, 8:43am UTC](https://forum.midibox.org/t/lcd-character-scrambling-futaba-vfd-m402sd10fj-core32/14707/8 "2010-11-17T08:43:34Z")

</div>

Pretty 🙂

---

<div class="post-metadata">

**Author:** ![quakitsduck](https://forum.midibox.org/letter_avatar_proxy/v4/letter/q/9fc29f/32.png) [@quakitsduck](https://forum.midibox.org/u/quakitsduck)\
**Post date:** [March 29, 2015, 11:49am UTC](https://forum.midibox.org/t/lcd-character-scrambling-futaba-vfd-m402sd10fj-core32/14707/9 "2015-03-29T11:49:01Z")

</div>

hi,

&nbsp;

i have issues with my noritake vfd can you hold my hand and break down what i need to do to get the display to work?

&nbsp;

Thanks
