afch / NixieClock

Firmware (Sketch) GRA & AFCH Nixie Clock MCU Boards NCM109 (NCM105 and NCM107 Discontinued Products) and Tubes Boards NCT2XX, NCT3XX, NCT4XX, NCT8XX
48 stars 32 forks source link

NCM109 v1.x for Tubes board NCT4xx and HV5222 #4

Open Fossdal opened 2 years ago

Fossdal commented 2 years ago

I got an MCU Board NCM109 v1.x for Tubes board NCT4xx and it has a HV5222. but the code is not working with this chip

CDAJoe commented 1 year ago

I found the issue during compiling. It is a line of code at line 220 stating SPI_Init where there is no code to call. I copied the Spi initialization from the sample code or codes from other boards for Spi to correct this.

CDAJoe commented 1 year ago

my bad the line is at 280 delete the SPI_Init(); and copy the next into its place moving existing code down. This got my unit working SPI.begin(); // SPI.setDataMode (SPI_MODE2); // Mode 2 SPI // судя по данным осциллографа нужно использовать этот режим SPI.setClockDivider(SPI_CLOCK_DIV8); // SCK = 16MHz/128= 125kHz //Serial.println(SPCR, BIN); //SPCR=B00111111; //Serial.println(SPCR, BIN);