SBN1661 in C #1399
Replies: 3 comments 7 replies
-
Part of the answers might be here: https://github.com/olikraus/u8g2/wiki/u8g2as7 Lines 174 to 176 in 3c6460a Obviously you have to modify the setup for your display. The setup function probably will be u8g2_Setup_sbn1661_122x32_1 or u8g2_Setup_sbn1661_122x32_f (depending on how much memory you can spent for u8g2), see https://github.com/olikraus/u8g2/wiki/u8g2setupc#sbn1661-122x32 Instead of u8x8_byte_4wire_sw_spi you need to use one of the parallel port byte functions: And finally you need to provide the gpio and delay callback. You can probably takeover the code from here (including the delay procedures): Line 112 in 3c6460a But you need to add the pins for your parallel interface. This means you need some code, which looks similar to this: Lines 131 to 136 in 3c6460a for U8X8_MSG_GPIO_D0 to U8X8_MSG_GPIO_D7. The full template (including all the case statements) is here: https://github.com/olikraus/u8g2/wiki/Porting-to-new-MCU-platform#template-for-the-gpio-and-delay-callback |
Beta Was this translation helpful? Give feedback.
-
BTW: You could still use old u8glib, it might be better optimized for AVR systems, but it is difficult for me to provide any support for u8glib. u8glib includes a lot of support for AVR which was removed for u8g2 to make u8g2 more portable. So the advantage of u8glib would be, that you do not need to write a callback function for the IO and delay procedures. |
Beta Was this translation helpful? Give feedback.
-
Hi!
I design analogue audio products for my small business and have been working on digital control for future products. I'm fairly new to C, but a couple of weeks after switching from Great Cow BASIC, I've managed to implement most of the control code in my project.
SBN1661-based controllers seem to be ideal for reproducing a frequency response chart, and I've ordered a prototype board using an ATMega164. While the board is fabricated and shipped, I'd love to get an understanding of U8G2 (or even U8Glib, but I realise that's been discontinued).
Call me an idiot, but I've spent two days trying to figure out how to assign pins for parallel* (8080 or 6800) use of the SBN1661. I THINK I've figured this out for U8Glib (via. u8g_init8bit in u8g.h), but I can't figure it out for U8G2. The Wiki seems to explain how to assign pins for Arduino and C++, but not for C.
I realise there's a lot to learn, but the first step is getting a display working, then I can gradually figure the rest out from there. I'm happy to use the original U8Glib if you guys think it'd be better, but I appreciate that this isn't the correct forum.
Any guidance would be greatly appreciated!
Cheers,
-Grant
(*The final device may use a different protocol, but due to limitations imposed by available thru-hole AVRs and the rest of my circuit, the hardware I2C/SPI pins are unavailable, so it must be parallel for now. I can hack the board and make small changes.)
Beta Was this translation helpful? Give feedback.
All reactions