Search Results - MEL PICBASIC Forum


Search:

Type: Posts; User: HenrikOlsson; Keyword(s):

Page 1 of 4 1 2 3 4

Search: Search took 0.03 seconds.

  1. Re: Make PIC simulate binary up/down counter - how to calculate how fast can it count

    We had a similar discussion not that long ago, might be worth revisiting.
    It's important to remember that one usually want to do more than JUST keep track of an enocder and that has to be accounted...
  2. Re: Need help with 16F676 button press

    I have a hard time believing that was the actual problem. In PBP (unlike, for example, C) = and == are the same thing. And you basically have the proof in your own code sine the WHILE loop works and...
  3. Re: Anyone worked with reading a sine/cosine encoder?

    With a 10bit ADC (like most PICs have) and a VRef of 5V you get a (theoretical) resolution of 4.88mV. Your typical sin/cos type encoder outputs 1Vpp which means that (again, in theory) you should be...
  4. Re: Anyone worked with reading a sine/cosine encoder?

    I forgot... Ideally you want an ADC with dual S/H inputs (or even dual converters) because sampling the two inputs in sequence as the encoder is moving will introduce errors. The error might be...
  5. Re: Anyone worked with reading a sine/cosine encoder?

    In your particular case with a low cycles-per-rev encoder and, I image, slow rotational speed (?) it might be possible to go for an all analog approach, otherwise you need to add some comparators to...
  6. Re: Joining 5 bit variables and splitting them into 8 bit ones later?

    I suspect this is what you want:

    displayvar.0[X]=Y

    But I also suspect we've covered this before so instead of me trying to repeat what's already been covered in detail I just leave it all to...
  7. Re: Determining variable length (number of digits) possible?

    12345 / 10 = 1234
    12345 / 100 = 123
    12345 / 1000 = 12
    12345 / 10000 = 1

    /Henrik.
  8. Replies
    2
    Views
    541

    Re: HD44780 LCD cable length

    This has been covered a couple of times over the years, see (and read) here for starters:

    http://www.picbasic.co.uk/forum/showthread.php?t=15989

    I suppose it might depend on a lot of variables,...
  9. Re: varable index buffer setup unsing a varable

    Allocation of memory is done at compile time - not during runtime. Hence the content of a variable can not dictate the size of an array since the content of a variable, by definition, can change...
  10. Replies
    21
    Views
    4,997

    Re: Better code check before compile?

    And the compiler is really only able (if so designed) to catch out-of-bounds error when you have a static index like that MAS[10]=20 but in many cases you're using an index variable like MAS[x]=20...
  11. Replies
    21
    Views
    4,997

    Re: Better code check before compile?

    You may have found something you did not know and it IS something to be aware of but it's not a bug. It's like that by design.
    It's all covered in details thru out section 7.6 in the manual - read...
  12. Replies
    2
    Views
    646

    Re: Bytes roll over sanity check

    That's something you could easily try/test/verify for your own verification in less time than what you had to wait for this answer but...Yes :-)

    /Henrik.
  13. Replies
    19
    Views
    2,753

    Re: BME280 sensor.

    Richard,
    Your change to the "cast routine" saved some 400bytes worth of code space and probably also executes faster. Thanks!

    Yeah, both of my sensors reports temperature which I believe to be...
  14. Replies
    19
    Views
    2,753

    Re: BME280 sensor.

    For anyone who are still interested in using this sensor with PBP I've posted my code as an example in the Wiki:
    http://www.picbasic.co.uk/forum/content.php?r=558-BME280-Example

    If any questions...
  15. Replies
    19
    Views
    2,753

    Re: BME280 sensor.

    Richard,
    Out of curiosity, have you tried the PBP code you posted with negative temperature values?

    The reason I ask is that my temperature compensation code was pretty much exactly like yours...
  16. Re: HSEROUT of array of data with termination on a null

    I'd try increasing the baudrate even further.
    According to Wikipedia 256kbits/second is a predefined serial port speed in Windows so you "should" have that available without doing anything...
  17. Replies
    19
    Views
    2,753

    Re: BME280 sensor.

    Thank you Richard, that did help.

    I've got pressure working as well.
    Temperature is within 0.05C and pressure is within 1Pa compared to a commercially available BME280 based sensor module.
    I...
  18. Replies
    33
    Views
    5,065

    Re: PWM/HPWM Stepper Motor Controller

    Yes, exactly so :-)
    That's sort of the idea behind the stepper motor - that you can relatively precisely control both the speed and the position without needing some sort of feedback device and...
  19. Replies
    19
    Views
    2,753

    Re: BME280 sensor.

    Does anyone have a BME280 sensor laying around?
    Can you read the compensation values and post them?

    I think I've now got pressure working as well but I'm curious to know another sensors comp...
  20. Replies
    33
    Views
    5,065

    Re: PWM/HPWM Stepper Motor Controller

    I see no reason for it not to work.
    But with an 8-pin device you're quickly running out of pins, step pulses out, solenoid drivers, perhaps a sensor of some sort to detect the items on the belt, a...
  21. Replies
    33
    Views
    5,065

    Re: PWM/HPWM Stepper Motor Controller

    Mark,
    Yeah, for precise positioning feeding the pulses back into the PIC and count them OR integrate generated velocity over time to calculate position. Possible but not exactly easy to get right,...
  22. Replies
    33
    Views
    5,065

    Re: PWM/HPWM Stepper Motor Controller

    David,
    You've done a great job so far!
    As you might know the torque of step motor falls off as the speed increases. Increasing the drive voltage counteracts this drop in torque. Doubling the...
  23. Replies
    19
    Views
    2,753

    Re: BME280 sensor.

    Thank you Richard!
    I see you too got the temperature conversion covered but not pressure and/or humidity which is where I'm currently got stuck. Haven't done anything with it for a couple of days,...
  24. Replies
    15
    Views
    1,942

    Re: Hersin quick question

    Hi Andy,
    Which PIC are you targeting (wondering if it's got an USART or EUSART)?
    My guess is that there's something weird going on with the baudrate.
    If possible, replace the Bluetooth connection...
  25. Replies
    15
    Views
    1,942

    Re: Hersin quick question

    Which device and out of curiousity, what's up with the slightly odd baudrate?

    Well nothing and intermittent isn't quite the same :-)
    Are you SURE the serial data is actually getting to the...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4