6502 Mite home-brew computer, interlude: SPI tutorial

preview_player
Показать описание
While we're waiting for the next step in the build, I thought I'd offer a tutorial on how SPI works, showing the signaling data and the code that makes it work. This is a longer video but I hope that it's instructive!
Рекомендации по теме
Комментарии
Автор

I used the SPI code and explanation in your video to optimize my I2C code. I was getting about 11kbps with my previous code and now I'm currently getting about 16kbps. I still have to move the data pin to pin7 to make use of the negative flag -- that will shave off a few more cycles. The principle I took with I2C is basically the same as the SPI code: load X and Y with precomputed Data Direction Register contents and then DEC instead of INC on the DDR to raise the I2C clock. Unfortunately you can't use that cool INC trick to read the data.

weekendrobot
Автор

Nice piece of 6502 optimised SPI code. The 65SPI seems like a bit of a cheat, for a retro system, but then again you are now using a modern LCD display. :)

gregclare
Автор

Very, very clever. Change "bra sendloop" to "beq sendloop" and "bra done" to "bcs done" and it's perfect. 😄

xotmatrix