zceemja / psoc1_prog

Cypress PSoC1 Programmer using Arduino nano
5 stars 2 forks source link

Issues with CY8C27443 and Uno #1

Open tunstek opened 2 years ago

tunstek commented 2 years ago

Initialization is getting stuck in infinite loop in data_pull() routine on line 92 of main.cpp

while((PINB & SDA_PIN) == 0); // wait until pin goes high

Commenting out this line will allow initialization to complete but sending a 'd' over serial to get the device ID gives an output of 0.

I've made the relevant changes to platformio.ini for the Uno but it is possible I'm missing something?

Here are changes I've made to platformio.ini:

board = uno
framework = arduino
board_build.mcu = atmega328p
zceemja commented 2 years ago

After sending initial vector chip has to set sdata pin to low, if it does not it means that chip is not in programming mode and something is wrong. This is why device id is 0 because chip is sending nothing. Double check connections and cypress chip.

Maybe uno has different pin numbers to atmega168? Check if each of pins SCL_PIN, RES_PIN and SDA_PIN corresponds to correct physical pins on the uno board