This PR allows a slight degree of adjustment to the duty cycle of the HUB75 pixel clock signal. Currently only SAMD51 incorporates this change. This may help in supporting a wider range of RGB matrices, some of which are persnickety about the shape of the clock signal. Default settings should work for the current P4 64x32 matrices. Older matrices might want slightly higher settings.
Duty can be adjusted with a call to:
matrix.setDuty(n);
where 'n' is (for different F_CPU settings):
120 MHz: 0–2 range, default 0
150 MHz: 0–3 range, default 1
180 MHz: 0–4 range, default 1
200 MHz: 0–5 range, default 2
'n' is related to CPU clock cycles but the percentage range of duty cycles isn't the same for each F_CPU. Best to experiment through trial and error. Adding the following in one’s loop() function may help:
int c = Serial.read();
if (c >= '0') matrix.setDuty(c - '0');
Or this might just be a huge boondoggle, in which case changes should be reverted to an earlier release (with a bumped version number to encourage updating).
This PR allows a slight degree of adjustment to the duty cycle of the HUB75 pixel clock signal. Currently only SAMD51 incorporates this change. This may help in supporting a wider range of RGB matrices, some of which are persnickety about the shape of the clock signal. Default settings should work for the current P4 64x32 matrices. Older matrices might want slightly higher settings.
Duty can be adjusted with a call to:
matrix.setDuty(n);
where 'n' is (for different F_CPU settings):'n' is related to CPU clock cycles but the percentage range of duty cycles isn't the same for each F_CPU. Best to experiment through trial and error. Adding the following in one’s loop() function may help:
Or this might just be a huge boondoggle, in which case changes should be reverted to an earlier release (with a bumped version number to encourage updating).