SNL-WaterPower / siweed

Sandia Interactive Wave Energy Education Display (SIWEED)
4 stars 2 forks source link

Due SPI/ encoder reading #62

Open nickross4444 opened 3 years ago

nickross4444 commented 3 years ago

SPI is reading all 0's from the decoder attached to the Due. @DeepFriedDerp is there a chance the due clock cycle is too fast? I don't remember if we tried slowing it down or not.

The other thing to try in the lab is using the level shifter. The board should work at reduced speeds at 3.3v, but a 5v supply should improve its reliability.

ryancoe commented 3 years ago

https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-11057-32-bit-Cortex-M3-Microcontroller-SAM3X-SAM3A_Datasheet.pdf

image

nickross4444 commented 3 years ago

562360a likely fixed this issue, I was missing a return(facepalm). I will put this as an enhancement since it is no longer necessary to switch to the onboard counter for V1.

ryancoe commented 2 years ago

@nickross4444 @DeepFriedDerp - Can you please re-summarize the issue here, why we would want to solve it, and how we would do so? This will help me in prioritizing the work within our development plan.

nickross4444 commented 2 years ago

We thought the encoder buffer wasn't working(ended up being software bug), and started brainstorming using the onboard quadrature decoder to count the encoders, instead of an offboard SPI counter(what we have now). The current solution is working well, but it was at some point mentioned that we could leave this as an enhancement to simplify the hardware. I am personally in favor of leaving it how it is now, as we are not having an issues with it, but it has some potential as a relatively advanced project for future team members.

ryancoe commented 2 years ago

Much more clear, thanks @nickross4444. I'm going to mark this as won't fix for the time being.