Search Results - MEL PICBASIC Forum


Search:

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

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    13
    Views
    12,667

    Re: Multiple Pulsin Measurements

    I decided to try and make the assembler less ugly first by using indirect addressing to access the Period[8] array but it is no faster than my laborious method and this one will only run on an...
  2. Replies
    13
    Views
    12,667

    Re: Multiple Pulsin Measurements

    Thanks so much for your helpful thoughts - I will go away and work at your suggestion - I agree interrupts may not be accurate enough - you are quite correct I am monitoring the 8 baby PICs'...
  3. Replies
    13
    Views
    12,667

    Re: Multiple Pulsin Measurements

    Thanks for your advice - I will think about your "Fun stuff" - actually the actual timings/test results are the opposite of what you understood from my description:
    so for a 1000 uS pulse you get as...
  4. Replies
    13
    Views
    12,667

    Re: Multiple Pulsin Measurements

    OK - the scenario is measuring multiple (8) pulses arising from eight simple 12F675 circuits outputing pulses - I can change that to whatever I want, currently 1mSec pulse every 50 mSec, but the...
  5. Replies
    13
    Views
    12,667

    Re: Multiple Pulsin Measurements

    I need to make 8 simultaneous (relatively) measurements of pulsewidth on 8 different input pins - is there a PIC that could handle this with timers or interrrupts?
  6. Replies
    13
    Views
    12,667

    Re: Multiple Pulsin Measurements

    OK - here it is in Assembler - disappointingly not that much faster!

    '**** mPULSIN defines ***
    Period var word[7]
    mPort var PortB
    Mask con %00000011 'Mask of port pins to check
    i ...
  7. Replies
    13
    Views
    12,667

    Re: Multiple Pulsin Measurements

    OK - I have written a PicBasic routine to do mPULSIN - a bit slow as you would expect, but works


    for i = 0 to 7 : Period[i] = 0 : next
    pCount = 65535 '...
  8. Replies
    13
    Views
    12,667

    Multiple Pulsin Measurements

    Does anyone have any experience of multiple PULSIN measurements - ie simultaneous on more than one pin - obviously would need to sample for a full sample period - 65535 cycles to be sure no pulses...
  9. Replies
    9
    Views
    9,132

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

    PBP evaluates expressions progressively - try using parentheses:
    IF ((RANGE0 < FAR) AND (RANGE0 > NEAR)) THEN
    I am assuming FAR is actually greater than NEAR not vice versa?
    Peter
  10. Re: How to upon receiving data via RS232, MCU immediately sends it back to the send

    Another error: you define Prati as a byte then use it as a label - remove the byte definition. Also you assign the output value to Isprati which is undefined
    Peter
  11. Replies
    3
    Views
    3,053

    Re: 18F2450 internal osc

    Two thoughts:
    1) I have found fuses are set by the loader fuse configuration, so no effect of changing them later
    2) OSCCON = 00000010 is not the same as OSCCON = %00000010, rather = %00001010 ie....
  12. Replies
    11
    Views
    17,306

    It is - and it decodes as typical PicBasic code -...

    It is - and it decodes as typical PicBasic code - a sample of lines follows:

    processor 12F683
    Radix DEC
    #include "P12F683.INC"
    __CONFIG 0x3CDC
    ERRORLEVEL -302

    ORG 0000H
    GOTO L00D7H
  13. Replies
    17
    Views
    10,352

    I am not familiar with PonyProg, are you using...

    I am not familiar with PonyProg, are you using the SI-Prog baseboard hardware and the I²CBus eeprom adapter - I note that the adaptor does not have any pullup resistors on SDA and SCL and the...
  14. Replies
    17
    Views
    10,352

    I suggest you use a data array to send your...

    I suggest you use a data array to send your bytes, and then you need to construct the ControlByte and address as in this example:


    Dat VAR byte[16]
    i var word
    j var...
  15. Replies
    17
    Views
    10,352

    Actually I was wrong about the Addressing - I...

    Actually I was wrong about the Addressing - I hadn't noticed you were using a 24C16 - I normally use larger chips - in fact the 24C16 needs a byte for the address. Unfortunately the addressing you...
  16. Replies
    17
    Views
    10,352

    Further investigation has revealed why your...

    Further investigation has revealed why your checksum still worked.... (sorry for the rather brief earlier reply - it was from my mobile phone!). If we use the following code:


    I2CAddr Var...
  17. Replies
    17
    Views
    10,352

    BTW you defined I2CAddr as a byte, but treat it...

    BTW you defined I2CAddr as a byte, but treat it as a word (2048) - should be a word.
    Peter
  18. Replies
    15
    Views
    11,909

    Now that is seriously helpful - Sorry I didnt...

    Now that is seriously helpful - Sorry I didnt spot those earlier on my searches - thank you so much for your help Bruce (and Darrel) - you are amazing!

    Peter
  19. Replies
    15
    Views
    11,909

    Since our production circuit board has been...

    Since our production circuit board has been professionally produced, there is not room for an extra Xtal and caps to drive TMR1 so I am trying to get the WDT to do the wake from sleep but with only...
  20. Replies
    8
    Views
    8,885

    I have just had a chance to check this out and it...

    I have just had a chance to check this out and it works fine - add:

    UCON var byte EXT
    to your PBP 2.46 program and it should solve the problem! You can now refer to for example:

    ...
  21. Replies
    15
    Views
    11,909

    Thanks for all your help Bruce - this is a...

    Thanks for all your help Bruce - this is a followup to report that an external 32 KHz crystal and two 33 pF caps have sorted my sleep problems - for the record this works a dream:

    T1CON = ...
  22. Replies
    8
    Views
    8,885

    I had the same problem - have now bought PBP2.6...

    I had the same problem - have now bought PBP2.6 upgrade but have not tested yet but I got around this in assembler where UCON is recognised:

    T0CON.7 = 0 ' Disable USBservice...
  23. Replies
    15
    Views
    11,909

    Thanks for your help Bruce - it has clarified my...

    Thanks for your help Bruce - it has clarified my (mis)understanding - looks like an external Xtal for Timer 1 is the way to go.
    BTW in case anyone is mislead by:
    into thinking Timer0 could be used...
  24. Replies
    15
    Views
    11,909

    OK - it IS late but I am now starting to...

    OK - it IS late but I am now starting to understand the Datasheet - I am switching into an Idle state, not a sleep by using

    OSCCON.7 = 1 'Set IDLEN - switch to SEC_IDLEif I use
    ...
  25. Replies
    15
    Views
    11,909

    ?Answered my own question

    Well, I carried on trying and reread the Datasheet - It states
    The power-managed Sleep mode in the PIC18F2455/2550/4455/4550 devices is identical to the legacy Sleep mode offered in all other PIC...
Results 1 to 25 of 35
Page 1 of 2 1 2