I have bought a cheap DDS module from CHina and want to start by producing a fixed output of 500kHz, there is no LCD or rotary encoder as yet; This is my code:
include "modedefs.bas"
pause 1000; allow circuit 1 sec to stabilise
pulsout porta.0,100;pulse reset pin
pause 20
pulsout porta.3,100;Pulse w_clk
pause 20
pulsout porta.2,100;pulse fq_ud to set up serial data mode
pause 20
shiftout porta.1,porta.3,0,[%10111000];send out tuning word 1 w0-w7
;porta.1 is data, porta.3 is W_CLK
shiftout porta.1,porta.3,0,[%00100100];send out tuning word 2 w8-w15
shiftout porta.1,porta.3,0,[%01100000];send out tuning word 3 w16-w23
shiftout porta.1,porta.3,0,[%10000000];send out tuning word 4 w24-w31
shiftout porta.1,porta.3,0,[%00000000];send out tuning word 5 w32-w39
pause 10
pulsout porta.2,100; pulse FQ_UD on data complete, update DDS
high portb.4
pause 2000
low portb.4;flash LED on portb.4 for 2 secs to show data sent
end
Needless to say, it wont work. I have also hardwired D0 and D1 to +Vdd and D2 to GND to force serial mode. Any advice?
John
Bookmarks