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.

Revision:
3:a643b6a454aa
Parent:
2:e9d2346ea1bb
--- 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