MetalMusings / MyOwnEtherCATDevice

Documentation accompanying the "Make My Own EtherCAT device" video serie on Youtube.
36 stars 4 forks source link

LAN9252 core board #11

Open 84864797 opened 4 hours ago

84864797 commented 4 hours ago

Hello May I ask a question LAN9252 comes with 16 GPIO built-in, and I can run the LAN9252 core board using the Dig_8IN_8OUT.xml file you provided. I want to configure it with 12 digital inputs and 4 digital outputs, but I tried for 2 days but couldn't succeed. I have no choice but to seek your advice

QQ截图20240920174705

MetalMusings commented 3 hours ago

Hi, this is a setting in the eeprom. The byte to change is the one below [image: bild.png] It determines if a pair of i/os are inputs or outputs. It's the Extended PDI Configuration Register. See section 12.14.30 in http://ww1.microchip.com/downloads/en/devicedoc/00001909a.pdf You can find details on the eeprom contents in section 12.8 in the same document. There is no way around reading the datasheet for these kind of details.

Change the value above, and upload the new firmware to LAN9252 in Twincat. You might need to change the "bitlen" field in the pdos above in the xml file. Hope it works.

Den fre 20 sep. 2024 kl 11:47 skrev 84864797 @.***>:

Hello May I ask a question LAN9252 comes with 16 GPIO built-in, and I can run the LAN9252 core board using the Dig_8IN_8OUT.xml file you provided. I want to configure it with 12 digital inputs and 4 digital outputs, but I tried for 2 days but couldn't succeed. I have no choice but to seek your advice

QQ.20240920174705.png (view on web) https://github.com/user-attachments/assets/5be5989d-5e50-433a-bee8-de6534c935e2

— Reply to this email directly, view it on GitHub https://github.com/MetalMusings/MyOwnEtherCATDevice/issues/11, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACY7HWSYMAXM7KY6XNYUXWLZXPVMLAVCNFSM6AAAAABORVQT62VHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZTQMZXGMYTMOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

84864797 commented 4 minutes ago

Thank you for your response Where are these values modified? Is it SSC?

MetalMusings commented 1 minute ago

At the end of the Dig_8IN_8OUT.xml file. Change it with a normal text editor.

Den fre 20 sep. 2024 kl 16:35 skrev 84864797 @.***>:

Thank you for your response Where are these values modified? Is it SSC?

— Reply to this email directly, view it on GitHub https://github.com/MetalMusings/MyOwnEtherCATDevice/issues/11#issuecomment-2363884258, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACY7HWV3VDEGT5UC4DL57Z3ZXQXE3AVCNFSM6AAAAABORVQT62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRTHA4DIMRVHA . You are receiving this because you commented.Message ID: @.***>