Code:
freq var word
dataout var word
hardcode var word
chipselect var portb.0 'or whatever pin you've got set for the chip select
datapin var portb.1 'or whatever pin you've got set for the data pin
clockpin var portb.2 'or whatever pin you've got set for the clock pin
hardcode = %0100100000000000 'hardcoded values - not in test mode, phase detector normal, stereo operation, doesn't (shouldn't?) change
freq = 1021 'frequency desired = 102.1 Mhz
dataout = hardcode + freq 'add in frequency value
high chipselect
shiftout datapin , clockpin , 0 , [ dataout/16 ]
low chipselect
Bookmarks