Integrate Teensy 4.1 design on custom PCB

Dear Paul,
I've replaced the Flash ("M") and it fixed the problem, now it works!! Thank you.
Now I found another issue that not all I/O pins are working (26,27,33,48,51,53,55)
I checked it on Teensy 4.1 and here only 3 pins (48,51,53) not functioning
the code:
void loop() {
tgl=!tgl;
for (int i = 0; i <= 61; i++) {
digitalWrite (i, (tgl));
Serial.print(i); Serial.print("************* "); Serial.println(tgl);
// delay(5);
}


do you have any ideas?
BR
Alex
 
Is that the whole program? I don't see a setup() function. This is important, because pinMode() needs to be used to put the pins into OUTPUT mode. If pinMode() isn't used, results will be unpredictable. Some pins may work, others may not. Only reliable if pinMode() used to configure the pins.
 
Hi Paul,
Now, I have only 2 pins 26,27 that are nor responding (possibly something on my PCB)
this is the whole one:

int Trev=1; char Tdate[12]= "2022-12-14";
int iiccount=0;int ts_prev=millis();
int led_ts_last=0;
int tgl=0;
//============================================================================
//***************************************************************************
// SETUP
//***************************************************************************
//============================================================================
void setup() {
Serial.println("****************************************************************");
Serial.printf("**** SETUP , Test Rev.%d Date %s ***********\n",Trev,Tdate);
Serial.println("****************************************************************");
Serial.print(iiccount,DEC); Serial.println (" cycles");
Serial.println("----------------------------------------------------------------");
for (int i = 0; i <= 61; i++) {
pinMode (i, OUTPUT); digitalWrite(i,LOW);Serial.print(i);
}
} // end of setup
//============================================================================
//***************************************************************************
// Start Main Loop //
//***************************************************************************
//============================================================================
void loop() {
ts_prev=millis();
iiccount=iiccount+1;
// leds[0] = CRGB ( iiccount/10*3,255-iiccount/10, iiccount/10*1); FastLED.show(); delay(100);
Serial.println("****************************************************************");
Serial.printf("***** LOOP Test Rev.%d Date %s ***********\n",Trev,Tdate);
Serial.println("****************************************************************");
Serial.print(" Cycle: ");Serial.println(iiccount,DEC);
Serial.println("----------------------------------------------------------------");
tgl=!tgl;
for (int i = 0; i <= 61; i++) {
digitalWrite (i, (tgl));
Serial.print(i); Serial.print("************* "); Serial.println(tgl);
delay(5);
}
}
//============================================================================
// End Main Loop //
//============================================================================

BR
 
Back
Top