Search results

  1. E

    10 bits to 8 bits

    It was/is for running a model car, the main engine. Since I'm running half-bridge mode, there is about 100 speed 'steps' each direction with stop being 127+-20 as the current is just too low for the engine to run in either direction very close to 127. It works very well now, the code is in the...
  2. E

    pause command seemingly ignored...

    Thank you, team :)! Understood, no problem to work around, of course. /Edmunds
  3. E

    pause command seemingly ignored...

    Dear all, I'm confused about this code ignoring pause 16000 between TestFWD and TestBWD subprocedures of newmain: in the file below. Can anyone spot what is wrong with it? Thank you for your time, /Edmunds
  4. E

    10 bits to 8 bits

    Ok, makes sense, thank you :) /Edmunds
  5. E

    10 bits to 8 bits

    Dear all, I'm configuring PWM with pokesfr, since I need to route around timers and use different pins than the defaults for picaxe firmware. 8 MSBs of duty cycle are stored in CCPRxL register and the remaining 2 LSBs are kept in bits 5:4 of CCPxCON register. Since the bits around 5:4 in CCPRxL...
  6. E

    Capacitive linear position sensor

    Ok, seems like I was wandering down the wrong path. I'll keep playing with inductive/hall options then. Thank you all for your inputs, Edmunds
  7. E

    Capacitive linear position sensor

    Or, perhaps, inductive like here: https://www.mdpi.com/1424-8220/11/11/10522/htm ...
  8. E

    Capacitive linear position sensor

    Dear all, Would it be possible to build a capacitive linear position sensor around picaxe Touch functionality? I'm thinking something like digital callipers, but a good 20 times smaller. To detect 10mm position with accuracy of 0.05-0.1mm. I realise that would require custom PCBs, but that is...
  9. E

    1:87 scale lorry line follower, TLS1401CCS, STSPIN220, 40X2

    Dear James, Thank you for your interest. I have since dropped the line-following project as not perspective. I have used many of the techniques and learnings, however, to design the 'magnet follower'. There are a couple of threads devoted to this on the forum, so just drop 'magnet follower' in...
  10. E

    ADC chip with built in oversampling and averaging

    Dear all, While working on a project, I came across Analog Devices AD7380/7381. It is a 2ch ADC converter, but the trick is, it has oversampling and averaging built in. This can be a great advantage for some projects where ADC readout can benefit from some digital filtering (say, averaging)...
  11. E

    irin vs servo

    Hey, my identity is back! AllyCat - I used exactly what you are proposing, but for some reason it did not work. I did not have time for longish investigation, so it might be I still did something wrong, but the preload I calculated (the same number as yours) threw servos in all directions...
  12. E

    Pushbutton ON/OFF

    Dear all, Thank you all for your inputs. I worked for some time more on it last night after posting and I have something like this that works: #macro EnterSleepMode() low D.7 'STSPIN220 EN low to save power and reduce heat low A.5...
  13. E

    Pushbutton ON/OFF

    Dear all, How would you go about implementing a single pushbutton ON/OFF control for a device? The program flow could be something like this: 1) Battery connected; 2) Sleep; 3) If button pressed, run init: procedure and do main: continuously; 4) If button pressed for like three seconds, run...
  14. E

    Limiting signed numbers to some value

    True, thanks for the reminder. Had slipped out of my head totally. Edmunds
  15. E

    Limiting signed numbers to some value

    Dear all, I have been fiddling with this for a few evenings, but had nothing to report. Tonight, I did a fresh attempt and got everything to work as expected. The problem so far [also with my own initial attempt] was I was trying to re-use variables. There were places where this was OK and...
  16. 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...
  17. 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
  18. 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...
  19. 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
Top