Welcome! Log In Create A New Profile

Advanced

Did anyone manage to get the demo program for BV4513 to work

Posted by MarkB 
Did anyone manage to get the demo program for BV4513 to work
July 29, 2013 04:07PM
BV4513 - serial interface.

I'm trying to get the demo program for arduino to compile (Mega 2560, Arduino 1.5.2) but it can't seem to find the right definitions in the include files.
I've tried rearranging the header files into the same directory, but no luck.

Does anyone have an updated arduino demo program for this (ttl serial uart interface, not I2c)?

Mark B
Re: Did anyone manage to get the demo program for BV4513 to work
July 29, 2013 04:59PM
Or failing an updated demo, can anyone tell me what i'm doing wrong here? I just always get A51 lit (ASI) but flickering at 1hz.Sometimes if I kill it by resetting the board I get some changes in the segments, so it's obviously sending some data - just not the right data.

int i =0;

void setup() {

Serial1.begin(9600);

Serial1.print("bn0 16");
Serial1.print("bn1 16");
Serial1.print("bn2 16");
Serial1.print("bn3 16");
}

void loop()
{
i++;

Serial1.print("bn0 ");
Serial1.println(i % 9);

delay(1000);

}
Re: Did anyone manage to get the demo program for BV4513 to work
July 29, 2013 06:42PM
The display Baud rate needs setting first, this is done by sending an initial CR, (byte 13 or 0xd or \r). Any command must always be followed by 13.

The BV4108 Library uses the same protocol but different commands so use that Library, it should work for the BV4513 but of course with different commands and address.
Re: Did anyone manage to get the demo program for BV4513 to work
July 29, 2013 10:05PM
Thanks Jimeer,

using \r instead of Println seems to have made it work. Which brings me to the next issue...

When I run the code as below, I get the output as follows (where _ is a blank space);

0 _ _ _
1 _ _ _
2 _ _ _
3 _ _ _
4 _ _ _
55 _ _
66 _ _
7 _ _ _
8 _ _ _

Any idea why 5 and 6 light two digits even though i'm only addressing digit 0?


Mark B



int i =0; 
void setup() { 
Serial1.begin(9600); 

Serial1.print("\r"); 
Serial1.print("\r"); 
Serial1.print("\r"); 

Serial1.print("bn0 16\r"); 
Serial1.print("bn1 16\r"); 
Serial1.print("bn2 16\r"); 
Serial1.print("bn3 16\r"); 
} 

void loop() 
{ 
i++; 
Serial1.print("bn0 "); 
Serial1.print(i % 9); 
Serial1.print("\r"); 
delay(1000); 
}

Re: Did anyone manage to get the demo program for BV4513 to work
July 31, 2013 09:17AM
Sending 5 or 6 as you appear to have should definitely produce just one digit as expected. There are two possible problems:
1) The adruino serial is not behaving as expected
2) A faulty display

You can test 1) if you have some other means of manually sending the command, a terminal and serial device. Or have you tried just sending bn0 5 on its own, eg:

void loop() 
{ 
Serial1.print("bn0 5"); 
Serial1.print("\r"); 
while(1); // wait here 
}
If the above produces 55 then it is probably the display in which case send it back to :
ByVac
PO BOX 4049
Penistone
SHEFFIELD
S36 6WP
for a replacement.
Re: Did anyone manage to get the demo program for BV4513 to work
July 31, 2013 08:35PM
Thanks Jim,

The code you posted does display 55 on the unit I have (and if I change the digit to a 6 displays 66), so I'll send it back to you.

Mark B
Sorry, only registered users may post in this forum.

Click here to login