Hello,
Trying to interface a 16F916 to an ISD Voice Chip using SPI commands.
The command structure for the PLAY Message op code is as follows:
BYTE 0 BYTE1
0x40 0x00
Looks like the Flowcode Send_Char only transmits 1 byte at a time I would need to do the following
SPI_INIT
SEND_CHAR 0x40 Play Opcode Byte
SEND_CHAR 0X00 Data Byte 1
SPI_UNINIT
Is the line SS held low between SPI_Init and SPI_UnInit regardless of how many SEND_CHAR's are in between? Some of the opcodes have up to 7 bytes and the chip expects SS to remain low during the time they are being sent.
Also, It's not clear in flowcode which pins are used for SS, SCLK and MOSI, MISO and how they are set
Hopefully this makes sense to someone
Thanks in advance !!
ISD1730 SPI Commands
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ISD1730 SPI Commands
Hello,
The CS pin is controlled by you, the init and uninit functions do not control the CS pin.
Most programs would simply initialise the SPI and then leave it this way.
The CS pins can be manually controlled using a output icon in single pin mode.
The hardware SPI specific pins are shown on the chip window - view - chip.
SCLK - SCK
MOSI - SDO
MISO - SDI
Example prog
Initialise SPI
output 0 to CS pin
SEND_CHAR 0x40 Play Opcode Byte
SEND_CHAR 0X00 Data Byte 1
output 1 to CS pin
The CS pin is controlled by you, the init and uninit functions do not control the CS pin.
Most programs would simply initialise the SPI and then leave it this way.
The CS pins can be manually controlled using a output icon in single pin mode.
The hardware SPI specific pins are shown on the chip window - view - chip.
SCLK - SCK
MOSI - SDO
MISO - SDI
Example prog
Initialise SPI
output 0 to CS pin
SEND_CHAR 0x40 Play Opcode Byte
SEND_CHAR 0X00 Data Byte 1
output 1 to CS pin
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel