Search:

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

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Re: Forum doesn't quite work when not logged in.

    It's not just you... I get the same when not logged in (HTTP ERROR 500)
  2. Replies
    14
    Views
    565

    Re: String matching?

    How about just storing the length of the string as part of the table?


    ASM
    Keywords
    db 5, "OUTP", 0
    db 5, "MEAS", 0
    db 5, "CURR", 0
    db 5, "VOLT", 0
    db 3, "AC", 0
  3. Replies
    13
    Views
    905

    Re: Tiny Bootloader and PIC18F27K40

    ; Modified for 18F27K40, was: $C6, K, 18K w/128KB Flash, $20000, $100, 64, 64, 1, 8, 4, 0,
    $C6, K, PIC18F27K40, $20000, $400, 64,32,2, 2, 4, 0,
    I'm not familiar with the settings for tiny, but the...
  4. Replies
    23
    Views
    1,600

    Re: DT Interrupts not Working with PIC16F19197

    One thing you might want to try...

    The 16F19197 has LAT registers. Use those to toggle the pins instead of the PORT registers.
    Unfortunately you can't use 'TOGGLE LATC.0' since TOGGLE expects a...
  5. Re: Doing something at predefined amount of steps?

    Division by zero is a meaningless operation. Its result is undefined.

    What does your calculator do when you try to divide by 0? What should it return?
  6. Replies
    15
    Views
    954

    Re: Revisiting Timers & Time Stamps

    That's true, but you might as well do it the correct way. I hate telling my customer the code "works most of the time".

    If you're doing this in 8-bit mode, one way to deal with a 16-bit timer...
  7. Replies
    15
    Views
    954

    Re: Revisiting Timers & Time Stamps

    Yes. Also, for reads you get a snapshot of both values simultaneously.

    Otherwise, in 8-bit mode you should look at the L and H values to determine if they're invalid due to a rollover right as you...
  8. Replies
    15
    Views
    954

    Re: Revisiting Timers & Time Stamps

    No, that's not correct. In 16-bit mode TMRH is buffered. All reads and write go thru the buffer register.

    When you write, you must set TMRH first then set TMRL. A write to TMRL latches the TMRH...
  9. Replies
    15
    Views
    954

    Re: Revisiting Timers & Time Stamps

    Also, you might find it better to use 16-bit read/write mode by setting RD16 (T1CON.1).
    That will help with any possible rollover between the two registers.

    You're already doing this, but in...
  10. Replies
    56
    Views
    16,346

    Re: Stable Adc Reading Routine

    That's how rounding works when you have fractional numbers.

    Most (all?) uC's only represent numbers using integers so there's no fractional part for it to "round". Division always throws away...
  11. Replies
    56
    Views
    16,346

    Re: Stable Adc Reading Routine

    It doesn't do it wrong. Integer division doesn't round... it truncates. If you want to round the number you need to do something before the division.


    Thank you.
  12. Replies
    56
    Views
    16,346

    Re: Stable Adc Reading Routine

    Well yes, at some point the last digit changes. That post rounds the value, which is what you complained about not having.
  13. Replies
    56
    Views
    16,346

    Re: Stable Adc Reading Routine

    I don't need such good precision, so I divide it by 10. Precision improves, but say if ADC reading is 700 and it changed to 699, after division I'm getting 69 or 70 alternating

    Keep the numbers in...
  14. Re: Glitches when changing portD seen on other ports

    In George's other thread he talks about using an 18F4680 with an ARCNET COM20020i on the bus.

    Have you followed the directions for setting up the bus interface type (80xx/68xx, mux/non-mux) in the...
  15. Replies
    2
    Views
    560

    Re: 18F4680 Internal Oscillator

    You might try setting OSCCON = $70

    That selects the primary clock (the one specified by the config OSC statement).
    That's required for a number of devices that have a PLL
  16. Replies
    18
    Views
    1,603

    Re: Programmer help

    There's only one outrageously large download and it contains both the MPLABX IDE and IPE.
    You can install them together or individually. The last time I installed just the IPE
    it didn't save much...
  17. Replies
    7
    Views
    1,043

    Re: DT_ints handling time.

    The fastest you can respond to a high-priority interrupt is 5-6 instruction cycles (assuming there's a GOTO at the vector location), so at 64MHz that's 375ns before your ISR code begins to execute.
    ...
  18. Re: Elapsed timer not working as expected at 64MHz

    Really???

    It sounds like retepsnikrep's problem was he was trying to transmit a byte every 1ms, and at 9600 baud a byte takes 1.04ms to send so no number of additional pics is going to fix that.
    ...
  19. Replies
    183
    Views
    16,489

    Re: PIC USB HID breakout board

    We seem to be going around in circles.


    I thought that the javascript running on the PC is input-only, so you can't send data to the pic via usb 'doanything'.

    The HID keyboard running on the...
  20. Replies
    183
    Views
    16,489

    Re: PIC USB HID breakout board

    Once you set the pin to output, the digital/analog mode setting doesn't really matter.
    You can output a 1 or 0 with the pin still in analog mode. All that bit does is turn off the digital input...
  21. Replies
    183
    Views
    16,489

    Re: PIC USB HID breakout board

    Also, most of the PORTB pins are dual analog/digital pins. You have to set them to digital mode otherwise they always read '0'.
    Either set ANSELB bits = 0 for the ones you want to be digital, or set...
  22. Replies
    183
    Views
    16,489

    Re: PIC USB HID breakout board

    The RBPU bit (INTCON2.7) is low-active, so 0=pullups enabled, 1=pullups disabled
  23. Replies
    183
    Views
    16,489

    Re: PIC USB HID breakout board

    As I say, If you enable the internal portb pullups and have your jumper/switch either open or to GND then the input will default to logic '1' since it's pulled high.

    The internal pullups are...
  24. Replies
    183
    Views
    16,489

    Re: PIC USB HID breakout board

    If you put your jumpers on PORTB then you can use the programmable pullups on those pins, so all you need is a jumper to GND.
    That gives you up to eight jumpers (or just use a PCB DIP switch) w/out...
  25. Replies
    183
    Views
    16,489

    Re: PIC USB HID breakout board

    That sounds about right.

    I don't know why they suggest adding a resistor to VSS. Just setting the unused IO to output low is good enough.
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4