Function generator code modified to work on the Freescale KL25Z

Dependencies:   mbed

Fork of AD9850 function generator SPI driver by Liam G

This is an update to the original AD9850 SPI driver produced by Liam Goudge.

The main changes are to assign the appropriate pins and to send the 40-bit AD9850 programming word as five 8-bit packets. This is necessary because the KL25Z only supports 8-bit SPI transfers.

Files at this revision

API Documentation at this revision

Comitter:
ptamike
Date:
Thu Oct 24 12:35:18 2013 +0000
Parent:
2:e9d2346ea1bb
Commit message:
Corrected pin numbers in comments

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Oct 23 23:17:55 2013 +0000
+++ b/main.cpp	Thu Oct 24 12:35:18 2013 +0000
@@ -6,8 +6,8 @@
 
 
 SPI device (PTD2, PTD3, PTD1); // Set the KL25Z SPI pins
-DigitalOut CS(PTD0); // Use pin P0_17 as a fake Chip select
-DigitalOut ADReset(PTA13); // Use Pin P0_7 as the reset line for AD9850
+DigitalOut CS(PTD0); // Use pin PTD0 as a fake Chip select
+DigitalOut ADReset(PTA13); // Use Pin PTA13 as the reset line for AD9850
 
 
 Serial pc(USBTX, USBRX); // tx, rx for debug terminal