#avr Logs

Jul 20 2022

#avr Calendar

05:40 AM specing_ is now known as specing
12:39 PM Fozzworth: hello folks
12:40 PM Fozzworth: I have a display (ILI9341) which only has an 8bit parallel interface available to connect to. My understanding of SPI is pretty limited, but I'd like to save some ports on my m328p by utilizing a SPI interface. From the hardware perspective, is this limited to adding a shift register (HC595) and accounting for all the timing requirements?
01:05 PM twnqx: i think that won't let you read back anything
01:10 PM LeoNerd: Yup; 74'595 is pretty simple for outputs
01:10 PM LeoNerd: There's no equally-nice input chip though. they all suck one way or another
01:25 PM Fozzworth: There is touch and sd card functionality on the device, but I don't need those. Are there other reads that I need to do to make the display work?
01:28 PM LeoNerd: Hmmmwhat?
01:28 PM Fozzworth: I don't think I think I really need to know what's on screen at any given time, just want to update when necessary
01:28 PM Fozzworth: I'm probably demonstrating my lack of general knowledge with LCDs among other things
01:31 PM LeoNerd: Usually you'd use an SPI SR to offload some low-bandwidth outputs, e.g. LED indicators, to free up IO pins
01:32 PM LeoNerd: That's unrelated to whatever you might be doing talking to an SPI display
01:33 PM Fozzworth: Freeing up IO on the 328 is my intent. The display I have doesn't have SPI built in to it so I guess I'm asking how I can do that myself and it's possible with a 595 SR.
01:34 PM Fozzworth: *if it's possible.
01:46 PM Fozzworth: A little context - The slave doesn't have SPI, just 8bit parallel interface for data. I understand the parallel interface would be much faster than with hardware SPI on the uC and even more so than using bit banged SPI, but that is pretty much where I'm at. Not really needing to maintain speed and this is more of an excercise to learn something with a probably over-ambitious goal being to assemble a transistor tester, which, for the most part have all
01:46 PM Fozzworth: the needed libraries ready to go.
01:47 PM nohit: hard to say. if this is your first time with ILI9341, i would first get it working without the spi and after that try it with spi+sr
01:51 PM Fozzworth: It is my first. I've got the parallel interface wired up to the m328 and successfully writing to the LCD using this library:
01:51 PM Fozzworth: https://github.com/Matiasus/ILI9341
02:06 PM nohit: ah that driver is kinda like bit-banging since avrs dont have lcd parallel interface, it only implements writes to the framebuffer. if it would have lcd parallel interface (8080 mode) like stm32s usually have, the framebuffer would get memorymapped to your address space and you would be able to read and write it like normal memory
02:38 PM Fozzworth: So dropping in the SR and utilizing SPI is more or less achieving the same result, albeit a bit slower?
02:55 PM nohit: yes
05:39 PM specing_ is now known as specing