Picomite and AD9833 (SigGenerator)
Author
Message
redtif
Newbie
Joined: 15/06/2022
Location: GermanyPosts: 7
Posted: 08:45am 17 Jun 2022
@ matherp
Thanks, this worked with AD9833. I've still some more problem with the breakoutboard. There is no output after the opamp. Directly from the AD9833 it's ok.
I will investigate.
matherp said
The Pico SDK doesn't appear to set the clock up until the first use of the bus. The workaround is to do a dummy transaction with CS high before you first use it for real
e.g.
setpin cspin,dout
pin(cspin)=1
setpin 4,5,6,spi
spi open 1000000,3,8
spi write 1,0
'
' now the clock will be high
'
I found one more different behavior at the pin init.
' setup the output pins
Pin(CS) = 1
SetPin CS, dout
Pin(FSY) = 1
SetPin FSY, dout
Pin(TrigPin) = 0
SetPin TrigPin, DOUT
This doesn't work. The pin for FSY is again low after the SETPIN!
After some testing I commented out the SETPIN. It's not needed in this case!
Thanks for your support!
If I got it working on the Picomite, I will post the adapted code here.
Rgds