Hello Arduino friends!
thanks for everyone who helped me with last posts. I am currently working on a cool project which is driving a thermal printer of a POS device. I have successfully drove the motor and now I am working on printing section. here is my code for printing section:
updateShiftRegister(data);
digitalWrite(DST1, HIGH);
delayMicroseconds(840);
digitalWrite(DST1, LOW);
digitalWrite(DST2, HIGH);
delayMicroseconds(840);
digitalWrite(DST2, LOW);
digitalWrite(DST3, HIGH);
delayMicroseconds(840);
digitalWrite(DST3, LOW);
digitalWrite(DST4, HIGH);
delayMicroseconds(840);
digitalWrite(DST4, LOW);
digitalWrite(DST5, HIGH);
delayMicroseconds(840);
digitalWrite(DST5, LOW);
digitalWrite(DST6, HIGH);
delayMicroseconds(840);
digitalWrite(DST6, LOW);
}
}
}
}
void updateShiftRegister(uint8_t *image){
digitalWrite(LAT,HIGH);
for(int row=0; row<384; row+=48){
shiftOut(DI, CLK, LSBFIRST, image[row]);
}
digitalWrite(LAT,LOW);
}
where “data” is a bitmap image I’ve attached below.
now when I start the process and drive motor simultaneously, I get nothing on paper. what do you think is the problem people?
I can see some out going pulses on DST2-6 with 3v MAX but on DST1 I only see one pulse with 5v MAX!
thanks again everyone! I hope I’ll be able to SOLVE this problem with you and share the solution so we all can use it for our future projects.
bitmap.ino (4 KB)