22
PowerCore FLEX
3.2.3 D/A Converter
The following sample programs can be found in the SAMPLES\PowerCoreFLEX\DAC
folder.
DAC_CAL.c
—Demonstrates how to calibrate a D/A converter channel using two
known voltages to generate the two coefficients, gain and offset, which will be written
to the simulated EEPROM in flash memory. This sample program must be compiled to
flash memory.
In order to run this sample program, you will need a voltmeter that is connected to the
D/A converter output channels and ground located at header position J3 on the Proto-
typing Board.
NOTE: This sample program will overwrite any existing calibration constants.
DAC_VOLT.c
—Outputs a voltage that can be read with a voltmeter. The output voltage
is computed using the calibration constants that are read from the simulated EEPROM
in flash memory. This sample program must be compiled to flash memory.
In order to run this sample program, you will need a voltmeter that is connected to the
selected D/A converter output channel and ground located at header position J3 on the
Prototyping Board.
3.2.4 Use of Serial Flash
The following sample programs can be found in the SAMPLES\PowerCoreFLEX\
SERIAL_FLASH
folder.
SFLASH_PATTERN_INSPECT.c
—When the sample program starts running, it
attempts to initialize a serial flash chip on the PowerCore module. Once a serial flash
chip is found, the sample program writes a pattern to the first 100 pages. The Dynamic C
STDIO
window will then display information about the page size. The user can then
either print out the contents of a specified page or clear (set to zero) all the bytes in a
specified page.
SFLASH_TEST.c
—This sample program tests a serial flash chip by performing a write
and a read. The results of the test are displayed in the Dynamic C STDIO window.