AMcTools Forum 
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
On_digital_in_edge on Bidir pin (Read 4715 times)
Gif
YaBB Newbies
*
Offline

I Love YaBB 2!

Posts: 12
CzechRepublic
Gender: male
On_digital_in_edge on Bidir pin
01/04/10 at 20:42:45
 
I choose this forum because empty, and someone must be first.
Didn't you want this forum also as "feature requests"?


I have problems with not getting On_digital_in_edge on bidir pin.
Yes, I read that it works only on input pin, but I didn't see reason why it should not work also on bidir pin (probably only when it is not driven)

I try to write component for ds18b20, so I need open-colector bidir pin and also react on input edges.
Now I handled it by using two pins connected together. One is bidir, switched between input for hi-impedance and output for hold low, and second pin is input only to catch signal edges.
Back to top
 
 
  IP Logged
ThVortex
Global Moderator
*****
Offline



Posts: 160
Austin, TX, USA
Gender: male
Re: On_digital_in_edge on Bidir pin
Reply #1 - 01/04/10 at 22:27:16
 
I ran into the same problem implementing an I2C EEPROM component. I emailed the moderator about it already and I think he's planning to fix it in the next release.

The workaround that I used is an On_time_step() function that constantly polls the bidir pin. Just look for "SDA_state" in my code:
http://code.google.com/p/thvortex-vmlab/source/browse/trunk/userlib/eeprom24/eeprom24.cpp
Back to top
 
 
WWW   IP Logged
Gif
YaBB Newbies
*
Offline

I Love YaBB 2!

Posts: 12
CzechRepublic
Gender: male
Re: On_digital_in_edge on Bidir pin
Reply #2 - 01/05/10 at 14:29:04
 
I prefer not using on_time_step as believe that handling only edges should speed-up simulation. Best if I can remove on_time_step and vmlab not even call/evaluate it (in future release?).

Do you think that I should use on_time_step instead of two pins?
Back to top
 
 
  IP Logged
moderator
YaBB Administrator
*****
Offline

I love forums, don't
you?

Posts: 308
AMcTools (Spain)
Gender: male
Re: On_digital_in_edge on Bidir pin
Reply #3 - 01/05/10 at 15:29:41
 
Yes, this is under schedule for fix.

I suggest you to use in the mean time two pins, the real bidirectional one, and some other "edge sense" input pin to detect such edges.

Back to top
 
 
WWW   IP Logged
moderator
YaBB Administrator
*****
Offline

I love forums, don't
you?

Posts: 308
AMcTools (Spain)
Gender: male
Re: On_digital_in_edge on Bidir pin
Reply #4 - 01/05/10 at 19:00:38
 
Sorry, this demonstrates that I didn't read you post well...

My suggestion was already in your post.... [smiley=embarassed.gif]
Back to top
 
 
WWW   IP Logged
Pages: 1
Send Topic Print