TinyIOx: read LC1 digital data. Now with generic PWM

A forum for discussing the MegaSquirt related (but non-B&G) board development, assembly, installation, and testing.

Moderators: jsmcortina, muythaibxr

racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by racingmini_mtl »

eMTea wrote:As for the R65, R66 and R67 (2,49k) in the upper illustration (for ADC's on MS3X card).
Are they only bias resistors, and should not be used with a 0-5v signal, only for thermal sensors?
Correct.
eMTea wrote:If above assumed correct, shall R23, R27 and R33 be 1k for 0-5v sensors and 2,2k for thermal sensors?
You can use 1k or 2.2k for all types. The value is not critical. The higher value will provide more filtering.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
arran
Master MS/Extra'er
Posts: 617
Joined: Mon Oct 29, 2012 2:34 am
Location: Brisbane Australia
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by arran »

Just thought I'd drop in and ask how the development of the AEM UEGO serial support is going? :)
RX7 Series 2 13B Turbo. Megasquirt 3 with 3X Expander and V3 CPU. Firmware 1.4.1
Knock module, twin EGT, real time clock, WBO2, full sequential fuel and spark
http://web.aanet.com.au/arran
Wergilius
Experienced MS/Extra'er
Posts: 162
Joined: Fri Sep 16, 2005 12:50 pm
Location: Stockholm, Sweden
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by Wergilius »

I have now updated to the latest firmware (0.2) but now have an issue with entering values in the generic PWM output (as in firmware 0.1).

(from a previous post)
"As for the PWM table, this seems to be a TunerStudio issue. Earlier version worked fine but the latest version doesn't. I have found a workaround until Phil fixes the issue. Use the attache ini for the TinyIOx. It works here so I hope it works for you too."

question 1)
Could this still be the cause of this problem, behavior is exactly the same, no more than 1.6 is possible to write?


question 2)
I'm using virtual i/o and pte2 as an input but when looking at the realtime display it do not match, it seems to work correct
since the port1 is changing from 0-3 depending in inputs, maybe I have set it up incorrect?

Image


question3)
is it possible to use pte2 in the output channel in programmable on/off outputs?
(i want to change polarity of the pte2 signal)

question 4)
if i log tinyiox.port1 in tunerstudio it works correct but remote port3 bit 0/1 do not seems to work, is it possible to log these?
i have not manage do find it anywhere (i'm using offset 45, table 7, can-id 4).
Wergilius
Experienced MS/Extra'er
Posts: 162
Joined: Fri Sep 16, 2005 12:50 pm
Location: Stockholm, Sweden
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by Wergilius »

project files, if needed
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by racingmini_mtl »

There is a problem with that project: there is no tune for the ECU or the TIOx. Please post the msq for both or a corrected project file.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Wergilius
Experienced MS/Extra'er
Posts: 162
Joined: Fri Sep 16, 2005 12:50 pm
Location: Stockholm, Sweden
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by Wergilius »

sorry, i was saving space but manage to corrupt data, please use this:

http://alfetta.se/tmp/GTV-Turbo-tmp.zip
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by racingmini_mtl »

I still need to check your other issues but the first one is a TunerStudio bug. If you use the latest beta 2.9.128 (or even earlier), you will have the problem you mention with the table values being 0.0 or 1.6. If you use TunerStudio v2.6.14 (the current release version), the bug is not there.

I don't know what happened because that bug was corrected a while ago but came back with the latest beta. I have notified Phil.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Wergilius
Experienced MS/Extra'er
Posts: 162
Joined: Fri Sep 16, 2005 12:50 pm
Location: Stockholm, Sweden
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by Wergilius »

Thank you for the update, that was my guess as well since old project behave the same. I never change this curve and have copied the table part from an old file so it should be corrected and downloaded once i connect, looks now ok offline

If I could make any wish, find out/confirm remote port io would be of highest priorety, this should be more of an cfg err from my side i guess
Wergilius
Experienced MS/Extra'er
Posts: 162
Joined: Fri Sep 16, 2005 12:50 pm
Location: Stockholm, Sweden
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by Wergilius »

hi,

i have now downloaded the manual cfg and the table for pwm output works ok.
(as before, if I change it, it gets corrupt)

The pwm output uses the cpu coolant as in input and also reads the actual pwm correct.
If logging the tinyiox port1, the value corresponds to the input bit 0 and 1 (0-3).


If I use on bit for table switching (later on the use will be sequential shift) it do not
respond to changes of the input, seems to be always on.

Do you have any suggestion where to start looking, i have access to an can logger if it
would be of any help. Should the tinyiox send out the port1-3 status without request?
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by racingmini_mtl »

Phil has fixed the bug in the latest TunerStudio beta version. If you update, you should get version 2.9.129 which will allow you to see and edit the PWM tables correctly.

Also, there were a couple of things that needed to be edited in the ini file for the TinyIOx, use the updated version below. That will correct the issue you saw with the virtual_io value in the realtime display.

You can use pte2 as an input but you can't do that at the same time as you use it for a programmable output. Was that your problem? Also, this input will be high (1) by default and you need to ground it to make it low (0).

And you are using port 1 on the TinyIOx and trying to use remote port 3 on the MS. What you need to do is use port 3 on the TinyIOx and leave port 1 unused.

Jean

EDIT: Changed the attached ini file to the correct one.
Last edited by racingmini_mtl on Wed Jul 06, 2016 7:26 am, edited 1 time in total.
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Wergilius
Experienced MS/Extra'er
Posts: 162
Joined: Fri Sep 16, 2005 12:50 pm
Location: Stockholm, Sweden
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by Wergilius »

Great! With the updated TS editing of the curve works, thank you!
Regarding the ini file, i think this is the wrong file since it has much more hardware than before?

And you are using port 1 on the TinyIOx and trying to use remote port 3 on the MS. What you need to do is use port 3 on the TinyIOx and leave port 1 unused.
yes.... now when you say it, that is of course how it must be setup, thank you

You can use pte2 as an input but you can't do that at the same time as you use it for a programmable output. Was that your problem? Also, this input will be high (1) by default and you need to ground it to make it low (0)
Not exactly, I would like to set it up as an input in the programmable outputs and use it as an condition.
Would it be possible to configuring it as input on port1 and then use that as an condition on port3 (port1=1 for example)

Image
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by racingmini_mtl »

You're correct the ini that was there was the wrong one. I've updated the post above and it now has the correct one for the TinyIOx. You should download it and update your project with it.

If you want to use a single channel inside port1 (or another port) as a condition for a programmable output, you need to use the "And" condition instead of "=". As for the MS3, this will check the bits (channels) inside the output channel you select, in your case port1, and do the bitwise operation: result = ((value & THRESHOLD) == HYST). So if you want to check channel 2 in port1, that would mean you use "And" with 2 as the threshold and the hysteresis.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Wergilius
Experienced MS/Extra'er
Posts: 162
Joined: Fri Sep 16, 2005 12:50 pm
Location: Stockholm, Sweden
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by Wergilius »

Ok, thank your for your help with the ini file and condition configuration.
I'll test later this evening but i'm confident it will work as expected.
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by racingmini_mtl »

In case you (or anyone else) need additional help on how to use the bitwise "And" comparison, here is a brief explanation of how it works:

Image

Hopefully that helps and does not add more confusion. It shows that you can use the comparison to check more than one bit at a time and that you can verify if each one is either on or off. That works the same way on the MS3 (and MS2) so you can use this to check many different status.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Donn29
MS/Extra Newbie
Posts: 26
Joined: Tue Nov 08, 2005 8:26 am
Location: Windsor, Ontario

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by Donn29 »

arran wrote:Just thought I'd drop in and ask how the development of the AEM UEGO serial support is going? :)
Will this be available in the future, or is there another way to get AEM serial into a MS3x?
1986 Toyota Celica Supra 7M-GTE 3.0L I6
MS3X 3.57 FW1.5.0
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx: read LC1 digital data. Now with generic PWM

Post by racingmini_mtl »

Donn29 wrote:
arran wrote:Just thought I'd drop in and ask how the development of the AEM UEGO serial support is going? :)
Will this be available in the future, or is there another way to get AEM serial into a MS3x?
There are no plans to support it at this time.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Post Reply