Function generator code modified to work on the Freescale KL25Z
Fork of AD9850 function generator SPI driver by
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, committed 2013-10-24
- 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 |
diff -r e9d2346ea1bb -r a643b6a454aa main.cpp --- 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