Pages: [1]   Go Down
Author Topic: Futaba M12BY02AA VFD Display  (Read 760 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm new here - be gentle smiley

I got a few of these displays pretty cheaply, and being I2C I thought they should be pretty easy to get working, problem is I'm stuck.  The datasheet for these displays is here - http://docs-asia.electrocomponents.com/webdocs/0f06/0900766b80f06185.pdf

I get that I need to send a device address byte, then a command or memory address byte, and then the data bytes, I presume with code resembling the following -

Wire.write(byte1);
Wire.write(byte2);
Wire.write(byte3);
etc, etc

The question is - how do I receive the acknowledge bits - the "0" that the display sends back after each byte is received.  Do I just do a Wire.read() line with a routine to look for a 0??

Any help or example code would be greatly appreciated.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, I've found some code on github from someone who has used this display before, unfortunately it was with a PIC not an AVR - https://github.com/Djhg2000/OpenHUDisplay/blob/master/m12by02aa.c

The code I am using so far is below, just to try to turn one of the three LED's on, before I try to get the display working -

Code:
#include <Wire.h>
byte I2C_add = B10100000; //address #0
byte disp_write = B01000000; //write to display memory
byte disp_bright = B10011111; //turn on display, maximum brightness
byte led_write = B01000101; //write to LED's


void setup() {
  Wire.begin();
}

void loop() {
  Wire.beginTransmission(0);
  Wire.write(I2C_add); //write to address #0
  Wire.write(disp_bright); //turn on display
  Wire.endTransmission();
  delay(250);
  Wire.beginTransmission(0);
  Wire.write(I2C_add);
  Wire.write(led_write); //write to LED
  Wire.write(B01000101); //turn LED 2 on
  Wire.endTransmission();
  delay(1000);
}

Any ideas??
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Symon777

I've writtem a Arduino driver for the M12BY02AA. Please see https://github.com/duke3000/M12BY02AA

How did you configure the address of the display? Leaving the three address pins open means address 7 (they are internally pulled-up).
Another caveat is that, every time you write data to the display, you have to re-enable the display to actually see somethinh on it. But this is all handled by the driver now. $

The driver isn't perfect yet, I will improve some things as soon as I'll have time for that.

edit: I use it on a Teensyduino 2.0, but it should work on any other Arduino with I2C bus.


Hope I could help,
Simon
« Last Edit: March 18, 2013, 04:21:57 am by duke3000 » Logged

Pages: [1]   Go Up
Jump to: