65 #define READ_TIMEOUT 20 66 #define MISO_TIMEOUT 1000 69 #define RECORDING_SIZE 50 81 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'A',
'B',
'C',
'D',
'E',
'F' 90 char id_string[51]=
"USBSPI,PIC,01,01,DC,DC590,----------------------\n\0";
93 '0',
'x',
'0',
'0',
'\0' 134 while (Serial.available() <= 0);
135 return(Serial.read());
144 if (command ==
'w') command=
'\1';
145 if (command ==
't') command=
'\1';
146 if (command ==
'v') command=
'\1';
147 if (command ==
'u') command=
'\1';
167 digitalWrite(2, LOW);
168 digitalWrite(3, LOW);
169 digitalWrite(4, LOW);
170 digitalWrite(5, LOW);
171 digitalWrite(6, LOW);
172 digitalWrite(7, LOW);
182 Serial.begin(115200);
188 Serial.print(
"hello\n");
224 if (
input(MISO)==1)
break;
263 if (pin_value ==
'0') digitalWrite(pin+2, LOW);
264 else digitalWrite(pin+2, HIGH);
271 if (
input(MISO)==0)
break;
372 if (
i2c_write(tx_data)==1) Serial.print(
'N');
375 if (
i2c_write(tx_data)==1) Serial.print(
'N');
426 Serial.print(
"hello\n");
char byte_to_hex_buffer[3]
#define output_high(pin)
Set "pin" high.
Header File for Linduino Libraries and Demo Code.
void spi_write(int8_t data)
Write a data byte using the SPI hardware.
char recording_buffer[RECORDING_SIZE]
int8_t i2c_start()
Write start bit to the hardware I2C port.
static void byte_to_hex(byte value)
union LT_union_int32_4bytes data
#define WITH_NACK
Use with i2c_read(WITH_NACK) to read without an acknowledge.
const byte i2c_auxiliary_mode
#define QUIKEVAL_GPIO
Linduino QuikEval GPIO pin (QuikEval connector pin 14) connects to Arduino pin 9. ...
int8_t i2c_write(uint8_t data)
Send a data byte to hardware I2C port.
#define output_low(pin)
Set "pin" low.
#define input(pin)
Return the state of pin "pin".
void quikeval_SPI_init(void)
Configure the SPI port for 4Mhz SCK.
LT_SPI: Routines to communicate with ATmega328P's hardware SPI port.
unsigned char pseudo_reset
LT_I2C: Routines to communicate with ATmega328P's hardware I2C port.
void quikeval_SPI_connect()
Connect SPI pins to QuikEval connector through the Linduino MUX. This will disconnect I2C...
int8_t spi_read(int8_t data)
The data byte to be written.
uint8_t i2c_read(int8_t ack)
Read a data byte from the hardware I2C port.
void quikeval_I2C_init(void)
Initializes Linduino I2C port.
void quikeval_I2C_connect(void)
Switch MUX to connect I2C pins to QuikEval connector.
#define WITH_ACK
Use with i2c_read(WITH_ACK) to read with an acknowledge.
#define QUIKEVAL_CS
QuikEval CS pin (SPI chip select on QuikEval connector pin 6) connects to Arduino SS pin...
uint8_t read_quikeval_id_string(char *buffer)
Read the id string from the EEPROM, then parse the product name, demo board name, and demo board opti...
char ui_buffer[UI_BUFFER_SIZE]
char hex_to_byte_buffer[5]