rename pin defined to match schematic

This commit is contained in:
interfisch 2023-02-11 12:17:47 +01:00
parent 880a558951
commit 6c15882b6e
2 changed files with 17 additions and 17 deletions

View File

@ -14,10 +14,10 @@ D3 - _clear
*/ */
//Pins connected to Shift registers on own controller board //Pins connected to Shift registers on own controller board
#define PIN_DATA 13 #define PIN_SR_DATA 13
#define PIN_CLK 14 #define PIN_SR_CLK 14
#define PIN_OE 27 //active low #define PIN_SR_OE 27 //active low
#define PIN_LATCH 26 #define PIN_SR_LATCH 26
//Pins connected to stuff on annax driver board //Pins connected to stuff on annax driver board
@ -30,7 +30,7 @@ D3 - _clear
#define PIN_DRIVE 25 //enables 12v to panels via transistor #define PIN_DRIVE 25 //enables 12v to panels via transistor
#define PIN_CLEAR 12 //connects CLEAR Pin from Annax board to GND (clears column) #define PIN_CLEAR 12 //connects CLEAR Pin from Annax board to GND (clears column)
//#define NUMPANELS 1
#define COLUMNBYTES 13 //4 columns per byte. one panel has 25 columns. (int)((numpanels*25)/4+1) #define COLUMNBYTES 13 //4 columns per byte. one panel has 25 columns. (int)((numpanels*25)/4+1)

View File

@ -9,11 +9,11 @@ Flipdot::Flipdot()
void Flipdot::init() void Flipdot::init()
{ {
pinMode(PIN_DATA, OUTPUT); pinMode(PIN_SR_DATA, OUTPUT);
pinMode(PIN_CLK, OUTPUT); pinMode(PIN_SR_CLK, OUTPUT);
pinMode(PIN_OE, OUTPUT); pinMode(PIN_SR_OE, OUTPUT);
pinMode(PIN_LATCH, OUTPUT); pinMode(PIN_SR_LATCH, OUTPUT);
pinMode(PIN_CLEAR, OUTPUT); pinMode(PIN_CLEAR, OUTPUT);
pinMode(PIN_DRIVE, OUTPUT); pinMode(PIN_DRIVE, OUTPUT);
@ -23,9 +23,9 @@ void Flipdot::init()
pinMode(PIN_RESET_DRVBRD, OUTPUT); pinMode(PIN_RESET_DRVBRD, OUTPUT);
digitalWrite(PIN_OE, HIGH); //Active Low digitalWrite(PIN_SR_OE, HIGH); //Active Low
digitalWrite(PIN_LATCH, LOW); digitalWrite(PIN_SR_LATCH, LOW);
digitalWrite(PIN_DRIVE, LOW); digitalWrite(PIN_DRIVE, LOW);
@ -112,10 +112,10 @@ bool Flipdot::setSelectedDot() {
return 0; return 0;
} }
digitalWrite(PIN_OE, LOW); //Active Low digitalWrite(PIN_SR_OE, LOW); //Active Low
digitalWrite(PIN_DRIVE, HIGH); digitalWrite(PIN_DRIVE, HIGH);
delayMicroseconds(MICROS_DRIVEDOTSET); //Drive Dot delayMicroseconds(MICROS_DRIVEDOTSET); //Drive Dot
digitalWrite(PIN_OE, HIGH); //Active Low digitalWrite(PIN_SR_OE, HIGH); //Active Low
digitalWrite(PIN_DRIVE, LOW); digitalWrite(PIN_DRIVE, LOW);
digitalWrite(PIN_RESET_DRVBRD,HIGH); //reset driverboard shift registers digitalWrite(PIN_RESET_DRVBRD,HIGH); //reset driverboard shift registers
@ -140,11 +140,11 @@ bool Flipdot::HBridgeOK() {
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 //select Rows via shift registers on own controller board
shiftOutSlow(PIN_DATA, PIN_CLK, LSBFIRST, row&0xff); //lower byte shiftOutSlow(PIN_SR_DATA, PIN_SR_CLK, LSBFIRST, row&0xff); //lower byte
shiftOutSlow(PIN_DATA, PIN_CLK, LSBFIRST, row>>8); //LSBFIRST= LSB is QH, bit 8 is QA. //upper byte shiftOutSlow(PIN_SR_DATA, PIN_SR_CLK, LSBFIRST, row>>8); //LSBFIRST= LSB is QH, bit 8 is QA. //upper byte
digitalWrite(PIN_LATCH, HIGH); digitalWrite(PIN_SR_LATCH, HIGH);
delayMicroseconds(MICROS_SHIFT_LATCH); delayMicroseconds(MICROS_SHIFT_LATCH);
digitalWrite(PIN_LATCH, LOW); digitalWrite(PIN_SR_LATCH, LOW);
digitalWrite(PIN_RESET_DRVBRD,LOW); //get driverboard shift registers out of reset digitalWrite(PIN_RESET_DRVBRD,LOW); //get driverboard shift registers out of reset