It’s like $12 vs $2 on element 14 which i thought was just too drastic!
EDIT: Ah…the search function is the problem…they aren’t that pricey
Thinking of making a simple LCD shield but doubles up as a prototyping shield for people who are new to try out LCD either through a 595 or just individual wires to the core.
It’s more for a learning tool for new beginners really.
Dang... on Digikey I was seeing $1.05 for the 595, and $0.47 for the 164. I was wondering why you splitting hairs over that price difference $10.00 more is definitely a problem!
Yep, it’s very easy. I’m removing wallpaper glue from walls right now, but I added a note to my backlog of things to do. Should be a quick fix. Ping me again if you don’t hear anything on this thread before the end of tomorrow.
am i understand that theoretically any program for arduino should work now as long as i copy the .h contents into a seperate tab and name it correctly?
I'm afraid not. Even if the arduino library doesn't use any low level AVR hardware or special things, then it at least needs to have some of the #defines and #includes commented out. It's not too bad, but until you do a few of them you won't think it's super duper easy. After then though, piece of
so i gave it a go to do the seperation myself, but it seems there is more to it… would it be possible for you to explain really quickly how you seperated it?
Hmm… well I just separated the files… and it was a little trickier than I thought because I pulled in some changes that I had made to the other LiquidCrystal library. Also there was a slight issue with the way the constructor was being initialized, that would fail when things were in separate files. I basically started with my LiquidCrystal library, that was already separated… made a copy of those files in my SPI library directory, renamed the files to have SPI on the end and started by copy/pasting the contents of each section of the old single file into separate files… paying close attention to the include guards. Then getting all of the includes straight. Then fixing the issue I mentioned. And finally adding changes to the file. Hopefully someday I can do a better job of explaining HOW to do this…
Please let me know if this works! It compiles online for me, but I don’t have the time now to test it.
inline void LiquidCrystal::writeFast(uint8_t value) {
pinResetFast(_latchPin);
for (uint8_t i = 0; i < 8; i++) {
if (value & (1 << (7-i))) { // walks down mask from bit 7 to bit 0
pinSetFast(_sdatPin); // Data High
else {
pinResetFast(_sdatPin); // Data Low
}
asm volatile("mov r0, r0" "\n\t" "nop" "\n\t" "nop" "\n\t" "nop" "\n\t" ::: "r0", "cc", "memory");
pinSetFast(_sclkPin); // Clock High (Data Shifted In)
asm volatile("mov r0, r0" "\n\t" "nop" "\n\t" "nop" "\n\t" "nop" "\n\t" ::: "r0", "cc", "memory");
pinResetFast(_sclkPin); // Clock Low
}
asm volatile("mov r0, r0" "\n\t" "nop" "\n\t" "nop" "\n\t" "nop" "\n\t" ::: "r0", "cc", "memory");
pinSetFast(_latchPin); // Latch High (Data Latched)
}
You will need to copy the library files to tabs in the web IDE to do the edits. Ideally, a pull-request should be done on the original repo (which I will investigate).