add use of annax board shift register reset input
This commit is contained in:
parent
72cfa9aa64
commit
b8d34ebd54
|
@ -23,6 +23,7 @@ D3 - _clear
|
|||
//Pins connected to stuff on annax driver board
|
||||
#define PIN_DATA_DRVBRD 33
|
||||
#define PIN_CLK_DRVBRD 32
|
||||
#define PIN_RESET_DRVBRD 15
|
||||
|
||||
//#define PIN_CLEAR 25 //active low
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ void Flipdot::init()
|
|||
pinMode(PIN_DATA, OUTPUT);
|
||||
pinMode(PIN_CLK, OUTPUT);
|
||||
pinMode(PIN_OE, OUTPUT);
|
||||
|
||||
pinMode(PIN_LATCH, OUTPUT);
|
||||
pinMode(PIN_CLEAR, OUTPUT);
|
||||
pinMode(PIN_DRIVE, OUTPUT);
|
||||
|
@ -19,12 +20,18 @@ void Flipdot::init()
|
|||
|
||||
pinMode(PIN_DATA_DRVBRD, OUTPUT);
|
||||
pinMode(PIN_CLK_DRVBRD, OUTPUT);
|
||||
pinMode(PIN_RESET_DRVBRD, OUTPUT);
|
||||
|
||||
|
||||
digitalWrite(PIN_OE, HIGH); //Active Low
|
||||
|
||||
digitalWrite(PIN_LATCH, LOW);
|
||||
|
||||
digitalWrite(PIN_DRIVE, LOW);
|
||||
|
||||
digitalWrite(PIN_RESET_DRVBRD,HIGH); //high = reset. set low to enable data flow to driverboard shift registers
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -83,6 +90,8 @@ bool Flipdot::clearSelectedColumn() {
|
|||
delayMicroseconds(MICROS_DRIVEDOTCLEAR);
|
||||
digitalWrite(PIN_CLEAR, LOW);
|
||||
digitalWrite(PIN_DRIVE, LOW);
|
||||
|
||||
digitalWrite(PIN_RESET_DRVBRD,HIGH); //reset driverboard shift registers
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -108,6 +117,8 @@ bool Flipdot::setSelectedDot() {
|
|||
delayMicroseconds(MICROS_DRIVEDOTSET); //Drive Dot
|
||||
digitalWrite(PIN_OE, HIGH); //Active Low
|
||||
digitalWrite(PIN_DRIVE, LOW);
|
||||
|
||||
digitalWrite(PIN_RESET_DRVBRD,HIGH); //reset driverboard shift registers
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -125,8 +136,8 @@ bool Flipdot::HBridgeOK() {
|
|||
return 1;
|
||||
}
|
||||
|
||||
void Flipdot::shiftData() { //send out all data to shift registers
|
||||
|
||||
|
||||
void Flipdot::shiftData() { //send out all data to shift registers
|
||||
|
||||
//select Rows via shift registers on own controller board
|
||||
shiftOutSlow(PIN_DATA, PIN_CLK, LSBFIRST, row&0xff); //lower byte
|
||||
|
@ -135,6 +146,8 @@ void Flipdot::shiftData() { //send out all data to shift registers
|
|||
delayMicroseconds(MICROS_SHIFT_LATCH);
|
||||
digitalWrite(PIN_LATCH, LOW);
|
||||
|
||||
digitalWrite(PIN_RESET_DRVBRD,LOW); //get driverboard shift registers out of reset
|
||||
|
||||
//Select Columns via Shift registers
|
||||
for (uint8_t i=0;i<COLUMNBYTES;i++) { //adsf: previously i<7
|
||||
shiftOutSlow(PIN_DATA_DRVBRD, PIN_CLK_DRVBRD, LSBFIRST, col[COLUMNBYTES-1-i]); //asdf previously col·[6-i]
|
||||
|
|
|
@ -160,6 +160,7 @@ void loop_drawClearTest() {
|
|||
|
||||
flipdot.setSelectedDot();
|
||||
|
||||
|
||||
unsigned long shiftduration=micros()-starttime;
|
||||
Serial.println("");
|
||||
Serial.print("Duration="); Serial.println(shiftduration);
|
||||
|
|
Loading…
Reference in New Issue