Search Results - MEL PICBASIC Forum


Search:

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

Page 1 of 4 1 2 3 4

Search: Search took 0.00 seconds.

  1. Re: I2c, srf02, 16f688 -> ultrasonic rangefinder

    Thanks, everyone, for the suggestions.

    After a different diagnostic strategy, I discovered I had made a really dumb mistake.

    I accidentally swapped (from a working scrap of code a few days ago...
  2. Re: I2c, srf02, 16f688 -> ultrasonic rangefinder

    Thanks, Bruce.

    I've used ADC with other devices (12F683; 16F88; 16F1827) and always gotten by with the RC clock.

    Can I use DEFINE ADC_CLOCK 1? Or if I use ADCON1=%00010000, do I simply omit...
  3. Re: I2c, srf02, 16f688 -> ultrasonic rangefinder

    Peter, thanks for chiming in. I added the parentheses. Still nothing, but it's a good point nevertheless.

    Yes, FAR is greater than NEAR. In fact, the way I have the pots configured, NEAR can...
  4. Re: I2c, srf02, 16f688 -> ultrasonic rangefinder

    Thanks, Al.



    It's the same delay used by jellis00, but I think he was running 18F devices and I don't know at what speed. (Or if that would make a difference.)



    Yes; per the SRF02...
  5. I2c, srf02, 16f688 -> ultrasonic rangefinder

    I'm noodling (finally) with an SRF02 ultrasonic rangefinder, communicating via I2C with a 16F688.

    I've used a similar program for an IR rangefinder, but I can't get this to work.

    Blinky tests: ...
  6. Replies
    19
    Views
    10,704

    I'm going to be working with the SRF02. I'd be...

    I'm going to be working with the SRF02. I'd be interested in knowing what you developed. I assume it was I2C and not serial?
  7. Replies
    58
    Views
    56,277

    Mine is Rev. 0, October 2006.

    Mine is Rev. 0, October 2006.
  8. Replies
    2
    Views
    1,776

    Okay, fixed it myself. I added a PAUSE 10 as...

    Okay, fixed it myself.

    I added a PAUSE 10 as shown.

    But I surely do not know why the fix worked!



    . . .
    READ 254,PFLAG ' Get state of memory protection
  9. Replies
    2
    Views
    1,776

    One works, one doesn't

    This, on a 12F683 and PBP 2.47, works fine:



    @ INT_ENABLE TMR1_INT ; Enable interrupt for timebase

    CYCLE=0 : FLASH=16 : FLASH2=9 ' Initial values for "idle"...
  10. Replies
    58
    Views
    56,277

    They are indeed temperamental. The timing...

    They are indeed temperamental. The timing information in the data sheets may be off by as much as 25%, and this is different from one device model to the next.

    I've been working with one for the...
  11. Replies
    26
    Views
    9,360

    This works like a dream! Thanks, Darrel!

    This works like a dream!

    Thanks, Darrel!
  12. Replies
    3
    Views
    2,188

    Thanks, Charles. The PBP manual says of DEFINE...

    Thanks, Charles.

    The PBP manual says of DEFINE WRITE_INT 1

    Disable/enable global interrupts in Write, which is why it sounded like a toggle to me.

    Looking at the 16F88 manual at 3.6.1,...
  13. Replies
    3
    Views
    2,188

    WRITECODE, ERASECODE, and interrupts

    For WRITECODE, my PBP manual (2.60) states (p. 176):

    If interrupts are used in a program, they must be turned off (masked, not DISABLED) before executing a WRITECODE, and turned back on (if...
  14. Replies
    5
    Views
    3,383

    Once again, Melanie, you've saved my bacon! It...

    Once again, Melanie, you've saved my bacon!

    It was Vref+ and Vref-. This is what I needed to do:

    ADCON1 = %11101000

    Bit 2 "0" selects Vss (internal) for Vref-
    Bits 1-0 "0" selects Vdd...
  15. Replies
    5
    Views
    3,383

    Alain, I didn't post code, schematic, or board...

    Alain, I didn't post code, schematic, or board because all three work just fine with a 16F88. Now, except for controlling the output pins (which Darrel solved in...
  16. Replies
    5
    Views
    3,383

    ADC or ADCIN "bias" problem?

    PIC16F1827 at 32MHz and PBP.

    My AN channels, specifically AN5 and AN6, are each connected to the wiper of a different pot giving a voltage range of 0-5VDC.

    Based on what I see on the...
  17. Replies
    20
    Views
    8,615

    Then: The reason the old PORTB.1 worked is...

    Then:

    The reason the old PORTB.1 worked is that little scootch of additional time between OHI=0 and OLO=1 caused by the GOTO?

    Were there Olympic Gold for PBP help, you'd get it!
  18. Replies
    11
    Views
    5,870

    I'll be working with TMR1 and IOC interrupts...

    I'll be working with TMR1 and IOC interrupts during the next few/several days (going back to the "reverse Simon says" project) and will let you know how those fare. NRN.
  19. Replies
    20
    Views
    8,615

    Sonofagun! It works. Thanks! What did we...

    Sonofagun! It works. Thanks!

    What did we just do?

    And why was PORTB.1 working but not the others?
  20. Replies
    20
    Views
    8,615

    When all else fails . . . "blinky" test!

    Here it is:

    @ __config _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _MCLRE_OFF & _BOREN_OFF & _FCMEN_OFF
    @ __config _CONFIG2, _STVREN_OFF & _LVP_OFF

    OLO VAR PORTB.5
    OLM VAR PORTB.4
    OMD ...
  21. Replies
    20
    Views
    8,615

    I didn't include anything else because (a)...

    I didn't include anything else because (a) everything ran fine on the '88 and (b) one of the five identically-processed channels is working just fine.

    All five channels are handled like this...
  22. Replies
    20
    Views
    8,615

    I've also tried to make sure the CCP/ECCP modules...

    I've also tried to make sure the CCP/ECCP modules were off by adding:

    CCP1CON=%00000000
    CCP2CON=%00000000
    CCP3CON=%00000000
    CCP4CON=%00000000

    No change from previous result.
  23. Replies
    20
    Views
    8,615

    I discovered the capacitive sensing module and...

    I discovered the capacitive sensing module and have added:

    CPSCON0.7=0 to turn it off.

    The effect was that the one working channel continues to work.

    The pot on AN6 also now works.

    But...
  24. Replies
    20
    Views
    8,615

    PBP migration from 16F88 to 16F1827

    Okay, I'm overlooking something. This program worked (albeit slowly) on a 16F88.

    5 analog pins sample and (after manipulation) produce a high or low to a pin. Here's the correspondence:

    AN0...
  25. Replies
    11
    Views
    5,870

    If my "blinky" is any indication, it works fine...

    If my "blinky" is any indication, it works fine for INT_INT, which is the only one I'm using at the moment. I also tested it (INT_INT) in the full program, and it is working, both on the output and...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4