
26
MISO, MOSI, SCLK, and SS were not taken directly from the SD card to the MCU as
shown in the figure but rather switched through the HEF4066 bilateral switch
integrated circuit [15]. Only during the time of reading the file for display will the
enable signal to the HEF4066 and the power to the digital photo frame be turned on.
This allows the photo frame, upon power up, to read that there is a new file on the SD
card, as well as saving power while the unit is not in use. The circuit board for these
connections to the Communications MCU were fabricated using PADS Logic and PADS
Layout in the same fashion as the Control MCU circuit board was designed.
Using PSoC designer the SPI connection was setup to communicate over the pins to
which the SD card was connected. The clock of the SPI communications block was set
up to run from an 8 bit Counter Block. This gives the ability to change the speed of the
SPI connection in real time by changing the values of the counter within the program
code. The counter clock is taken from VC1 having a divider of 2. The main clock signal
is 24 MHz which is divided by the VC1 value of 2, then divided by the period value for
the counter which is initialized to 60. When the SPI connection block receives the clock
signal it divides this again by two to find its clock rate. This gives a calculated clock
signal of 100 KHz which is used for the initialization of the SD card. Once the
initialization is finished, the Counter Block is programmed to switch to a period of eight
for a clock speed of 750 KHz. This is the speed that is used for data transfer.
This speed can be taken up to several MHz if needed after the card initialization is
accomplished below a speed of 400 KHz. For stability issues the speed was kept
relatively low for this project. Additionally, the UART baud rate limits the speed of the
data flow, so higher rates on the SPI connection are not necessary.
Komentarze do niniejszej Instrukcji