SPI Encoder bit banging

Post Reply
0xBedz
Posts: 4
Joined: Fri Jan 15, 2021 4:30 am
Location: New Zealand
Contact:

SPI Encoder bit banging

Post by 0xBedz »

Hello people, I've just started diving into the code and I've noticed that the code for a SPI Encoder is not actually using the built in SPI peripheral, instead it's bit banging it.
May I ask; why is that?
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: SPI Encoder bit banging

Post by johu »

Of course you may :)
The three available pins are not lined up with the spi peripheral. There was no priority on that but rather on reading quadrature encoders.
Not sure if anyone even uses this mode as resolvers are supported natively.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
0xBedz
Posts: 4
Joined: Fri Jan 15, 2021 4:30 am
Location: New Zealand
Contact:

Re: SPI Encoder bit banging

Post by 0xBedz »

Of course! I failed to take the hardware into account it seems...
Thank you :)
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: SPI Encoder bit banging

Post by EV_Builder »

johu wrote: Fri Jan 15, 2021 8:31 am Of course you may :)
The three available pins are not lined up with the spi peripheral. There was no priority on that but rather on reading quadrature encoders.
Not sure if anyone even uses this mode as resolvers are supported natively.
The Tesla SDU has a quadrature encoder or am i wrong?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: SPI Encoder bit banging

Post by johu »

yes
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply