7i43 firmware reconfiguration or new firmware?
- andypugh
- Offline
- Moderator
- Posts: 23537
- Thank you received: 4852
Can you also make one of the encoders have only the A encoder pin? In other words, the configuration of A+B encoder pins is global or defined per encoder?
How fast does that encoder need to count? You could possibly use the software encoder counter connected to a GPIO pin if it is below 500hz. (You could go higher with a fast thread, but that seems eccentric with a Mesa card config)
Please Log in or Create an account to join the conversation.
- kostas
- Topic Author
- Offline
- Premium Member
- Posts: 110
- Thank you received: 6
BTW, I have a question. I thought that the 7i43's encoders only work with quadrature counting. How can it work if it only has one channel? Or is this a stupid question?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23537
- Thank you received: 4852
BTW, I have a question. I thought that the 7i43's encoders only work with quadrature counting. How can it work if it only has one channel? Or is this a stupid question?
You can set an encoder to "counter mode". See "encoder" here:
www.linuxcnc.org/docview/html/man/man9/hostmot2.9.html
If you just ignore the "direction" pin then it counts up.
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17859
- Thank you received: 4766
A one input counter works because the HostMot2 encoder counter has a up/down mode (in this mode A is count and B is direction) There is one peculiarity of this setup: unused module inputs are terminated at a '0' level, so if the B input is not present, the B input to the encoder counter with the missing B connection will be tied low, so the counter will always count down. This should be fixable either with a negative scale or a hal comp.
Please Log in or Create an account to join the conversation.
- kostas
- Topic Author
- Offline
- Premium Member
- Posts: 110
- Thank you received: 6
P3
1 dir
3 pwm
5 encoder A
7 encoder B
9 GPIO
11 GPIO
13 dir
15 pwm
17 encoder A
19 encoder B
21 GPIO
23 GPIO
25 dir
27 pwm
29 encoder A
31 encoder B
33 GPIO
35 GPIO
37 dir
39 pwm
41 encoder A
43 encoder B
45 pwm without dir
47 encoder single channel
P4
1 encoder A
3 encoder B
5 encoder A
7 encoder B
9 encoder A
11 encoder B
13 encoder A
15 encoder B
17 GPIO
19 GPIO
21 GPIO
23 GPIO
25 GPIO
27 GPIO
29 GPIO
31 GPIO
33 GPIO
35 GPIO
37 GPIO
39 GPIO
41 GPIO
43 GPIO
45 GPIO
47 GPIO
7i43 is 400K
Thanks in advance,
Kostas
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17859
- Thank you received: 4766
This is important because the driver only allows you to enable 0 through N of any module (in other words you cannot enable only PWM 0,1 and 3 for example)
If I put them in the wrong order and you dont enable all modules (looks like you have 5 PWMs and 8 encoders), you may not end up with enabled modules on the pins you expected...
Please Log in or Create an account to join the conversation.
- kostas
- Topic Author
- Offline
- Premium Member
- Posts: 110
- Thank you received: 6
pwm order number will increment with the pin numbers, so:
pwm0=P3(1,3)
pwm1=P3(13,15)
pwm2=P3(25,27)
pwm3=P3(37,39)
pwm4=P3(45)
Same with the encoders, except for pin P3(47) which I'd like to have in the end of the list, so the order will be:
enc0=P3(5,7)
enc1=P3(17,19)
enc2=P3(29,31)
enc3=P3(41,43)
enc4=P4(1,3)
enc5=P4(5,7)
enc6=P4(9,11)
enc7=P4(13,15)
enc8=P3(47)
I plan to search and learn how to configure the pinout myself in the near future, so I will not be a burden next time if I need minor modifications.
Thanks again!
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17859
- Thank you received: 4766
freeby.mesanet.com/kostas.zip
The zip file include the bitfile, a text (.pin) documentation file,
and the VHDL pin file with your specific configuration/pinout.
This last file is not needed but is included as a reference if you want to
learn what determines the pinout/configuration of HostMot2 firmware
Please Log in or Create an account to join the conversation.
- kostas
- Topic Author
- Offline
- Premium Member
- Posts: 110
- Thank you received: 6
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17859
- Thank you received: 4766
Its really easy to change pinouts.and configs, basically just edit
an existing PINXXX file with copy/paste and re-compile...
Please Log in or Create an account to join the conversation.