Recent content by edmunds

  1. E

    Limiting signed numbers to some value

    Dear @Aries , Not there yet either :). I have successfully ported your code on top of mine, figured out how it works and while it tracks current_pos, which could be used to know that no more Movement commands should be accepted, the MAX operators only deal with immediate inputs, not the...
  2. E

    Limiting signed numbers to some value

    Dear @hippy, I got your code working on top of mine (i.e. in the vehicle) and what it seems to be doing is limiting the steering response per loop to what the limit is. Not quite there yet, but closing in :). Thank you for your input, Edmunds
  3. E

    Limiting signed numbers to some value

    I added a few numbers to @hippy's input data and made a table of what the position and outputs need to be with limits set at -200 and +200 Input Position Output 0 0 0 'all zero for start -350 -200 -200...
  4. E

    Limiting signed numbers to some value

    Looks promising :). Have not tried it yet, will try to do this tonight, too. Thank you for your time, Edmunds
  5. E

    Limiting signed numbers to some value

    That is a good summary, I think with exception of this Above is done by P(I)D algorithm and while it might not look like much, is reasonably tuned for the chassis I'm working with through many painful iterations. I would like to avoid touching it, so I want to stick addition and limiting on...
  6. E

    Limiting signed numbers to some value

    I replaced all the macroses with code for now, so now the main loop is pretty understandable and should compile with MagLine function removed. Symbol No_magnet = bit30 'No magnet [1], magnet present [0] Symbol counter0 = w17 'b34:b33; Just a counter Symbol ELine = w15...
  7. E

    Limiting signed numbers to some value

    The inputs are decent controlled values, coming out of a PID algorithm, overflow risks are being controlled. 0 is $0000, sorry, my bad. Over $8000 are negative and counting backwards exactly as you say. Thank you for your input, Edmunds
  8. E

    Limiting signed numbers to some value

    Dear @hippy, Thank you once again for showing the way with how to feed some string of values to the function for testing. I'm now playing with the code and I can see this will not give up so easily. What you are doing now, is, you are capping the value of steer to not go over the limit on a per...
  9. E

    Limiting signed numbers to some value

    Great :). Thank you, @hippy. Edmunds
  10. E

    Limiting signed numbers to some value

    Dear all, I have a problem I have attempted to address a few times now with limited success. I think I even tried to ask this forum once or at least seriously considered it before :) - I will try to be more clear about what I'm trying to do this time. There is a signed word variable...
  11. E

    1Hz oscilator

    Dear all, Once again, thank you for all the replies. The solution I have designed into a PCB that is being produced at some place China as we speak, is based on TCA6507 - 'LOW-VOLTAGE 7-BIT I2C AND SMBus LED DRIVER WITH INTENSITY CONTROL AND SHUTDOWN'. The device measures just 2.00mm x 1.40mm...
  12. E

    1Hz oscilator

    Hippy, is timer0 available for us through PokeSFRs? I have sort of neglected it, because it is not used for PWM or counting functions when I was at timers, but it seems, with a 255 prescaler, in 16bit mode I could generate interrupt every 0.5s on overflow to toggle a pin. If access to interrupt...
  13. E

    1Hz oscilator

    You are right, sorry, I misread the data sheet. Thank you, Edmunds
  14. E

    1Hz oscilator

    I2C as such did work and reasonably well. I have had issues with a hanging bus on some vehicles, but this could be due to hardware issues and it could also be possible to work around this in software. I have been running from multi-picaxe solution, because of complexity of maintaining several...
Top