Thomas, there may be a bug in the max7317 component: uint8_t max7317::Input(uint8_t port) … uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 1, port + 0x80); According to the max7317 specsheet the read operation needs a second (dummy) byte. So this should be… uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 2, port + 0x80, 0); Please try & report. Regards, Michael Am 09.07.19 um 13:10 schrieb - -:
Hello,
How can I read inputs from max7317. when I try to log ESP_LOGD(TAG,"EGPIO5 input: %d", MyPeripherals->m_max7317->Input(MAX7317_EGPIO_5));
i get allways 0 when i put the egpio pin to GND or 3.3v do i somthing wrong or does it not work.
Regards Thomas
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
I did some tests myself, it turned out there was more to do here. First, the max7317 really needs 16 bits for every command. Second, the reads were done on the output level registers, inputs are mapped to bit fields in 0x0e & 0x0f. Third, the max7317 needs a deselect between the tx and the rx. No, really, I've tried even half duplex mode, the deselect really is necessary. Fix is pushed. I've also added an "egpio input" shell command. Regards, Michael Am 09.07.19 um 20:00 schrieb Michael Balzer:
Thomas,
there may be a bug in the max7317 component:
uint8_t max7317::Input(uint8_t port) … uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 1, port + 0x80);
According to the max7317 specsheet the read operation needs a second (dummy) byte. So this should be…
uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 2, port + 0x80, 0);
Please try & report.
Regards, Michael
Am 09.07.19 um 13:10 schrieb - -:
Hello,
How can I read inputs from max7317. when I try to log ESP_LOGD(TAG,"EGPIO5 input: %d", MyPeripherals->m_max7317->Input(MAX7317_EGPIO_5));
i get allways 0 when i put the egpio pin to GND or 3.3v do i somthing wrong or does it not work.
Regards Thomas
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
Then you're now doing something wrong. Please describe your test setup. Regards, Michael Am 10.07.19 um 10:35 schrieb - -:
Hi,
i have test it, but it seems not to work. it return always 0 when i put the egpio to GND or 3.3v
Michael Balzer <dexter@expeedo.de> hat am 9. Juli 2019 um 22:58 geschrieben:
I did some tests myself, it turned out there was more to do here.
First, the max7317 really needs 16 bits for every command. Second, the reads were done on the output level registers, inputs are mapped to bit fields in 0x0e & 0x0f. Third, the max7317 needs a deselect between the tx and the rx. No, really, I've tried even half duplex mode, the deselect really is necessary.
Fix is pushed. I've also added an "egpio input" shell command.
Regards, Michael
Am 09.07.19 um 20:00 schrieb Michael Balzer:
Thomas,
there may be a bug in the max7317 component:
uint8_t max7317::Input(uint8_t port) … uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 1, port + 0x80);
According to the max7317 specsheet the read operation needs a second (dummy) byte. So this should be…
uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 2, port + 0x80, 0);
Please try & report.
Regards, Michael
Am 09.07.19 um 13:10 schrieb - -:
Hello,
How can I read inputs from max7317. when I try to log ESP_LOGD(TAG,"EGPIO5 input: %d", MyPeripherals->m_max7317->Input(MAX7317_EGPIO_5));
i get allways 0 when i put the egpio pin to GND or 3.3v do i somthing wrong or does it not work.
Regards Thomas
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
I have the egpio5 (port 6) pin on GND. then in the shell: egpio input 6. then the gpio5 (port 6) pin to 3.3V. then in the shell: egpio input 6. both return 0 Regards Thomas
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 10:40 geschrieben:
Then you're now doing something wrong. Please describe your test setup.
Regards, Michael
Am 10.07.19 um 10:35 schrieb - -:
Hi,
i have test it, but it seems not to work. it return always 0 when i put the egpio to GND or 3.3v
Michael Balzer dexter@expeedo.de hat am 9. Juli 2019 um 22:58 geschrieben:
I did some tests myself, it turned out there was more to do here.
First, the max7317 really needs 16 bits for every command. Second, the reads were done on the output level registers, inputs are mapped to bit fields in 0x0e & 0x0f. Third, the max7317 needs a deselect between the tx and the rx. No, really, I've tried even half duplex mode, the deselect really is necessary.
Fix is pushed. I've also added an "egpio input" shell command.
Regards, Michael
Am 09.07.19 um 20:00 schrieb Michael Balzer:
Thomas,
there may be a bug in the max7317 component:
uint8_t max7317::Input(uint8_t port) … uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 1, port + 0x80); According to the max7317 specsheet the read operation needs a second (dummy) byte. So this should be…
uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 2, port + 0x80, 0); Please try & report.
Regards, Michael
Am 09.07.19 um 13:10 schrieb - -:
Hello,
How can I read inputs from max7317. when I try to log ESP_LOGD(TAG,"EGPIO5 input: %d", MyPeripherals->m_max7317->Input(MAX7317_EGPIO_5));
i get allways 0 when i put the egpio pin to GND or 3.3v do i somthing wrong or does it not work.
Regards Thomas
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
The pin on the internal expansion connector, right? Not the external 26 pin expansion socket? Regards, Mark.
On 10 Jul 2019, at 4:50 PM, - - <egon@heuer-humfeld.de> wrote:
I have the egpio5 (port 6) pin on GND. then in the shell: egpio input 6.
then the gpio5 (port 6) pin to 3.3V. then in the shell: egpio input 6.
both return 0
Regards Thomas
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 10:40 geschrieben:
Then you're now doing something wrong. Please describe your test setup.
Regards, Michael
Am 10.07.19 um 10:35 schrieb - -:
Hi,
i have test it, but it seems not to work. it return always 0 when i put the egpio to GND or 3.3v
Michael Balzer dexter@expeedo.de hat am 9. Juli 2019 um 22:58 geschrieben:
I did some tests myself, it turned out there was more to do here.
First, the max7317 really needs 16 bits for every command. Second, the reads were done on the output level registers, inputs are mapped to bit fields in 0x0e & 0x0f. Third, the max7317 needs a deselect between the tx and the rx. No, really, I've tried even half duplex mode, the deselect really is necessary.
Fix is pushed. I've also added an "egpio input" shell command.
Regards, Michael
Am 09.07.19 um 20:00 schrieb Michael Balzer:
Thomas,
there may be a bug in the max7317 component:
uint8_t max7317::Input(uint8_t port) … uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 1, port + 0x80); According to the max7317 specsheet the read operation needs a second (dummy) byte. So this should be…
uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 2, port + 0x80, 0); Please try & report.
Regards, Michael
Am 09.07.19 um 13:10 schrieb - -:
Hello,
How can I read inputs from max7317. when I try to log ESP_LOGD(TAG,"EGPIO5 input: %d", MyPeripherals->m_max7317->Input(MAX7317_EGPIO_5));
i get allways 0 when i put the egpio pin to GND or 3.3v do i somthing wrong or does it not work.
Regards Thomas
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
Yes, the internal expansion connector. EGPIO_5 not GEP_5
Mark Webb-Johnson <mark@webb-johnson.net> hat am 10. Juli 2019 um 11:01 geschrieben:
The pin on the internal expansion connector, right? Not the external 26 pin expansion socket?
Regards, Mark.
On 10 Jul 2019, at 4:50 PM, - - <egon@heuer-humfeld.de> wrote:
I have the egpio5 (port 6) pin on GND. then in the shell: egpio input 6.
then the gpio5 (port 6) pin to 3.3V. then in the shell: egpio input 6.
both return 0
Regards Thomas
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 10:40 geschrieben:
Then you're now doing something wrong. Please describe your test setup.
Regards, Michael
Am 10.07.19 um 10:35 schrieb - -:
Hi,
i have test it, but it seems not to work. it return always 0 when i put the egpio to GND or 3.3v
Michael Balzer dexter@expeedo.de hat am 9. Juli 2019 um 22:58 geschrieben:
I did some tests myself, it turned out there was more to do here.
First, the max7317 really needs 16 bits for every command. Second, the reads were done on the output level registers, inputs are mapped to bit fields in 0x0e & 0x0f. Third, the max7317 needs a deselect between the tx and the rx. No, really, I've tried even half duplex mode, the deselect really is necessary.
Fix is pushed. I've also added an "egpio input" shell command.
Regards, Michael
Am 09.07.19 um 20:00 schrieb Michael Balzer:
Thomas,
there may be a bug in the max7317 component: > uint8_t max7317::Input(uint8_t port) > … > uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 1, port + 0x80); According to the max7317 specsheet the read operation needs a second (dummy) byte. So this should be… > uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 2, port + 0x80, 0); Please try & report.
Regards, Michael
Am 09.07.19 um 13:10 schrieb - -: > Hello, > > > How can I read inputs from max7317. > when I try to log ESP_LOGD(TAG,"EGPIO5 input: %d", MyPeripherals->m_max7317->Input(MAX7317_EGPIO_5)); > > > i get allways 0 when i put the egpio pin to GND or 3.3v > do i somthing wrong or does it not work. > > > Regards Thomas
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26 _______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
- Where do you contact EGPIO5? - Where do you get 3.3V? External +3.3V is only present if you're powering from 12V Am 10.07.19 um 10:50 schrieb - -:
I have the egpio5 (port 6) pin on GND. then in the shell: egpio input 6.
then the gpio5 (port 6) pin to 3.3V. then in the shell: egpio input 6.
both return 0
Regards Thomas
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 10:40 geschrieben:
Then you're now doing something wrong. Please describe your test setup.
Regards, Michael
Am 10.07.19 um 10:35 schrieb - -:
Hi,
i have test it, but it seems not to work. it return always 0 when i put the egpio to GND or 3.3v
Michael Balzer dexter@expeedo.de hat am 9. Juli 2019 um 22:58 geschrieben:
I did some tests myself, it turned out there was more to do here.
First, the max7317 really needs 16 bits for every command. Second, the reads were done on the output level registers, inputs are mapped to bit fields in 0x0e & 0x0f. Third, the max7317 needs a deselect between the tx and the rx. No, really, I've tried even half duplex mode, the deselect really is necessary.
Fix is pushed. I've also added an "egpio input" shell command.
Regards, Michael
Am 09.07.19 um 20:00 schrieb Michael Balzer:
Thomas,
there may be a bug in the max7317 component:
uint8_t max7317::Input(uint8_t port) … uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 1, port + 0x80); According to the max7317 specsheet the read operation needs a second (dummy) byte. So this should be…
uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 2, port + 0x80, 0); Please try & report.
Regards, Michael
Am 09.07.19 um 13:10 schrieb - -:
Hello,
How can I read inputs from max7317. when I try to log ESP_LOGD(TAG,"EGPIO5 input: %d", MyPeripherals->m_max7317->Input(MAX7317_EGPIO_5));
i get allways 0 when i put the egpio pin to GND or 3.3v do i somthing wrong or does it not work.
Regards Thomas
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
i use the internal Expansion. And there is 3.3v when powered over USB. pin 1 3.3v -> pin 18 EGPIO_5 pin 28 GND -> pin 18 EGPIO_5
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 11:03 geschrieben:
* Where do you contact EGPIO5? * Where do you get 3.3V? External +3.3V is only present if you're powering from 12V
Am 10.07.19 um 10:50 schrieb - -:
I have the egpio5 (port 6) pin on GND. then in the shell: egpio input 6.
then the gpio5 (port 6) pin to 3.3V. then in the shell: egpio input 6.
both return 0
Regards Thomas
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 10:40 geschrieben:
Then you're now doing something wrong. Please describe your test setup.
Regards, Michael
Am 10.07.19 um 10:35 schrieb - -:
Hi,
i have test it, but it seems not to work. it return always 0 when i put the egpio to GND or 3.3v
Michael Balzer dexter@expeedo.de hat am 9. Juli 2019 um 22:58 geschrieben:
I did some tests myself, it turned out there was more to do here.
First, the max7317 really needs 16 bits for every command. Second, the reads were done on the output level registers, inputs are mapped to bit fields in 0x0e & 0x0f. Third, the max7317 needs a deselect between the tx and the rx. No, really, I've tried even half duplex mode, the deselect really is necessary.
Fix is pushed. I've also added an "egpio input" shell command.
Regards, Michael
Am 09.07.19 um 20:00 schrieb Michael Balzer:
Thomas,
there may be a bug in the max7317 component: > uint8_t max7317::Input(uint8_t port) > … > uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 1, port + 0x80); According to the max7317 specsheet the read operation needs a second (dummy) byte. So this should be… > uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 2, port + 0x80, 0); Please try & report.
Regards, Michael
Am 09.07.19 um 13:10 schrieb - -: > Hello, > > > How can I read inputs from max7317. > when I try to log ESP_LOGD(TAG,"EGPIO5 input: %d", MyPeripherals->m_max7317->Input(MAX7317_EGPIO_5)); > > > i get allways 0 when i put the egpio pin to GND or 3.3v > do i somthing wrong or does it not work. > > > Regards Thomas
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26 _______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
I'll replicate your test with my module this evening. I did the test on EGPIO_8 routed to the DA26 connector, that worked correctly. Regards, Michael Am 10.07.19 um 11:15 schrieb - -:
i use the internal Expansion. And there is 3.3v when powered over USB. pin 1 3.3v -> pin 18 EGPIO_5 pin 28 GND -> pin 18 EGPIO_5
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 11:03 geschrieben:
* Where do you contact EGPIO5? * Where do you get 3.3V? External +3.3V is only present if you're powering from 12V
Am 10.07.19 um 10:50 schrieb - -:
I have the egpio5 (port 6) pin on GND. then in the shell: egpio input 6.
then the gpio5 (port 6) pin to 3.3V. then in the shell: egpio input 6.
both return 0
Regards Thomas
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 10:40 geschrieben:
Then you're now doing something wrong. Please describe your test setup.
Regards, Michael
Am 10.07.19 um 10:35 schrieb - -:
Hi,
i have test it, but it seems not to work. it return always 0 when i put the egpio to GND or 3.3v
Michael Balzer dexter@expeedo.de hat am 9. Juli 2019 um 22:58 geschrieben:
I did some tests myself, it turned out there was more to do here.
First, the max7317 really needs 16 bits for every command. Second, the reads were done on the output level registers, inputs are mapped to bit fields in 0x0e & 0x0f. Third, the max7317 needs a deselect between the tx and the rx. No, really, I've tried even half duplex mode, the deselect really is necessary.
Fix is pushed. I've also added an "egpio input" shell command.
Regards, Michael
Am 09.07.19 um 20:00 schrieb Michael Balzer: > Thomas, > > there may be a bug in the max7317 component: >> uint8_t max7317::Input(uint8_t port) >> … >> uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 1, port + 0x80); > According to the max7317 specsheet the read operation needs a second (dummy) byte. So this should be… >> uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 2, port + 0x80, 0); > Please try & report. > > Regards, > Michael > > > Am 09.07.19 um 13:10 schrieb - -: >> Hello, >> >> >> How can I read inputs from max7317. >> when I try to log ESP_LOGD(TAG,"EGPIO5 input: %d", MyPeripherals->m_max7317->Input(MAX7317_EGPIO_5)); >> >> >> i get allways 0 when i put the egpio pin to GND or 3.3v >> do i somthing wrong or does it not work. >> >> >> Regards Thomas
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
here a picture with 3.3v to egpio5
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 12:08 geschrieben:
I'll replicate your test with my module this evening. I did the test on EGPIO_8 routed to the DA26 connector, that worked correctly.
Regards, Michael
Am 10.07.19 um 11:15 schrieb - -:
i use the internal Expansion. And there is 3.3v when powered over USB. pin 1 3.3v -> pin 18 EGPIO_5 pin 28 GND -> pin 18 EGPIO_5
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 11:03 geschrieben:
* Where do you contact EGPIO5? * Where do you get 3.3V? External +3.3V is only present if you're powering from 12V
Am 10.07.19 um 10:50 schrieb - -:
I have the egpio5 (port 6) pin on GND. then in the shell: egpio input 6.
then the gpio5 (port 6) pin to 3.3V. then in the shell: egpio input 6.
both return 0
Regards Thomas
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 10:40 geschrieben:
Then you're now doing something wrong. Please describe your test setup.
Regards, Michael
Am 10.07.19 um 10:35 schrieb - -:
Hi,
i have test it, but it seems not to work. it return always 0 when i put the egpio to GND or 3.3v > Michael Balzer dexter@expeedo.de hat am 9. Juli 2019 um 22:58 geschrieben: > > I did some tests myself, it turned out there was more to do here. > > First, the max7317 really needs 16 bits for every command. Second, the reads were done on the output level registers, inputs are mapped to bit fields in 0x0e & 0x0f. Third, the max7317 needs a deselect between the tx and the rx. No, really, I've tried even half duplex mode, the deselect really is necessary. > > Fix is pushed. I've also added an "egpio input" shell command. > > Regards, > Michael > > > Am 09.07.19 um 20:00 schrieb Michael Balzer: > > Thomas, > > > > there may be a bug in the max7317 component: > > > uint8_t max7317::Input(uint8_t port) > > > … > > > uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 1, port + 0x80); > > According to the max7317 specsheet the read operation needs a second (dummy) byte. So this should be… > > > uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 2, port + 0x80, 0); > > Please try & report. > > > > Regards, > > Michael > > > > > > Am 09.07.19 um 13:10 schrieb - -: > > > Hello, > > > > > > > > > How can I read inputs from max7317. > > > when I try to log ESP_LOGD(TAG,"EGPIO5 input: %d", MyPeripherals->m_max7317->Input(MAX7317_EGPIO_5)); > > > > > > > > > i get allways 0 when i put the egpio pin to GND or 3.3v > > > do i somthing wrong or does it not work. > > > > > > > > > Regards Thomas
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
I've tried all ports now, all work as expected. Did you try other ports? Maybe your P6 is defective? Regards, Michael Am 10.07.19 um 12:21 schrieb Thomas Heuer:
here a picture with 3.3v to egpio5
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 12:08 geschrieben:
I'll replicate your test with my module this evening. I did the test on EGPIO_8 routed to the DA26 connector, that worked correctly.
Regards, Michael
Am 10.07.19 um 11:15 schrieb - -:
i use the internal Expansion. And there is 3.3v when powered over USB. pin 1 3.3v -> pin 18 EGPIO_5 pin 28 GND -> pin 18 EGPIO_5
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 11:03 geschrieben:
* Where do you contact EGPIO5? * Where do you get 3.3V? External +3.3V is only present if you're powering from 12V
Am 10.07.19 um 10:50 schrieb - -:
I have the egpio5 (port 6) pin on GND. then in the shell: egpio input 6.
then the gpio5 (port 6) pin to 3.3V. then in the shell: egpio input 6.
both return 0
Regards Thomas
Michael Balzer <dexter@expeedo.de> hat am 10. Juli 2019 um 10:40 geschrieben:
Then you're now doing something wrong. Please describe your test setup.
Regards, Michael
Am 10.07.19 um 10:35 schrieb - -: > Hi, > > > i have test it, but it seems not to work. > it return always 0 when i put the egpio to GND or 3.3v >> Michael Balzer dexter@expeedo.de hat am 9. Juli 2019 um 22:58 geschrieben: >> >> I did some tests myself, it turned out there was more to do here. >> >> First, the max7317 really needs 16 bits for every command. Second, the reads were done on the output level registers, inputs are mapped to bit fields in 0x0e & 0x0f. Third, the max7317 needs a deselect between the tx and the rx. No, really, I've tried even half duplex mode, the deselect really is necessary. >> >> Fix is pushed. I've also added an "egpio input" shell command. >> >> Regards, >> Michael >> >> >> Am 09.07.19 um 20:00 schrieb Michael Balzer: >>> Thomas, >>> >>> there may be a bug in the max7317 component: >>>> uint8_t max7317::Input(uint8_t port) >>>> … >>>> uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 1, port + 0x80); >>> According to the max7317 specsheet the read operation needs a second (dummy) byte. So this should be… >>>> uint8_t* p = m_spibus->spi_cmd(m_spi, buf, 1, 2, port + 0x80, 0); >>> Please try & report. >>> >>> Regards, >>> Michael >>> >>> >>> Am 09.07.19 um 13:10 schrieb - -: >>>> Hello, >>>> >>>> >>>> How can I read inputs from max7317. >>>> when I try to log ESP_LOGD(TAG,"EGPIO5 input: %d", MyPeripherals->m_max7317->Input(MAX7317_EGPIO_5)); >>>> >>>> >>>> i get allways 0 when i put the egpio pin to GND or 3.3v >>>> do i somthing wrong or does it not work. >>>> >>>> >>>> Regards Thomas -- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
participants (5)
-
- - -
Egon@heuer-humfeld.de -
Mark Webb-Johnson -
Michael Balzer -
Thomas Heuer