dbuezas / lgt8fx

Board Package for Logic Green LGT8F328P LGT8F328D and LGT8F88D
359 stars 90 forks source link

48 pins device : fastio D32 is wrong #223

Closed trimarco232 closed 1 year ago

trimarco232 commented 1 year ago

D32 is PORTF, 5 ; it must be PORTE, 5 (D37 is PORTF, 5) ... didn't find the reason of the issue ...

LaZsolt commented 1 year ago

I think I found the reason of the issue. In file fastio_digital.h the port F referenced more than 8 times. Must be changed in line 38 the DDRF to DDRE. Must be changed in line 89 the DDRF to DDRE. Must be changed in line 140 the PORTF to PORTE. Must be changed in line 191 the PORTF to PORTE. Must be changed in line 242 the PINF to PINE. Must be changed in line 293 the PINF to PINE.

LaZsolt commented 1 year ago

@trimarco232 Have you tested the modifications to see if they work well?

LaZsolt commented 1 year ago

I fixed fastio_digital.h : https://github.com/dbuezas/lgt8fx/commit/b2f00c8913a6857ef5486b30997d15616a14e858

trimarco232 commented 1 year ago

Hi, ok, a great fix for a great board (the purple one) , thanks ! note that fastioMode(25, OUTPUT) , is not enough to make the pin 25 a digital pin : use, for example, pinMode(25, OUTPUT) , before , typically in the setup

LaZsolt commented 1 year ago

@trimarco232 Thank you for your feedback.