Search Results - MEL PICBASIC Forum


Search:

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

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Re: ADC keyboard and fast response to user input, possible?

    Maincode:
    Adcin 0,x
    if x=128 then y=y+1
    if x=0 then y=y-1
    pause 100
    if x=255 then pointcheck
    if x < 255 then maincode
    pointcheck:
    Gosub display
    goto maincode
  2. Re: How to prevent variable going below zero?

    I like Tumbleweed's code. Shorter and more to the point.
  3. Re: How to prevent variable going below zero?

    Will this work for you?

    iflag var bit
    let iflag =0

    reader:
    adcin 0,Z
    pause 100
    IF Z>100 AND Z<130 THEN I=I+5
    IF Z<100 and iflag = 0 THEN I=I-5 'only if iflag = 0 it's OK to substract
  4. Thread: Mplab icd 2

    by peterdeco1
    Replies
    1
    Views
    300

    Mplab icd 2

    I have an ICD 2. How do you use it to program PICs? There's no IC socket.
  5. Replies
    5
    Views
    588

    Re: 16F88 -- weird stuff Ansel?

    Michael I only needed to use the 'F88 for 1 project. Here is my header. I never had any trouble with the inputs or outputs.

    OSCCON = $60 'set int osc to 4mhz
    ANSEL = 0 ANALOG INPUTS NONE
    ADCON0...
  6. Replies
    7
    Views
    722

    Re: Output directly to input?

    Yes Ioannis I would expect it would have issues at high speed. It was an experiment at low speed just to see if a PIC could "mirror" an output on multiple pins.
  7. Replies
    7
    Views
    722

    Re: Output directly to input?

    Yes. A while back I tied the HPWM output to an input and programmed it to make all my output ports go high and low with the input. I had multiple outputs at the same frequency as the HPWM.
  8. Replies
    4
    Views
    498

    Re: 16F88 but more memory

    I looked into that a long while ago and was told to optimize my code (which I did) or move to an 18F part. The 18F part number recommendations did not have the same pinout. Unless Microchip released...
  9. Re: I hope everybody is having a Great and Merry Xmas...

    Merry Christmas and Happy New Year to All.
  10. Replies
    13
    Views
    2,793

    Re: Forum Adverts

    NO! Don't hit the off switch. If it comes to that, ask for donations and count me in.
  11. Replies
    1
    Views
    892

    Re: For ALL of you in the STATES

    It's hot here in New York too Dave.
  12. Replies
    1
    Views
    1,205

    Re: SLEEP and NAP commands

    I always leave watchdog timer on. I use nap 0 to reduce current drain.

    start:
    nap 0
    if porta.1 = 1 then run
    goto start

    run:
    xxxxxxxxxxxxxxxxxx
  13. Thread: amp hours

    by peterdeco1
    Replies
    1
    Views
    1,752

    amp hours

    Hello everyone. I have a question that is confusing to me. If I draw 1 amp from a battery for 1 second and do this 2 times per minute, how many amp hours am I draining it? I'm trying to figure out...
  14. Replies
    7
    Views
    2,981

    Re: quick question 12F683

    Thank you everyone. I found a spot that goes up to a full 3V when the circuit is activated but is a difficult connection to make. I'm going to use the ADC solution as this connection is much faster...
  15. Replies
    7
    Views
    2,981

    Re: quick question 12F683

    Unfortunately the circuit board is already manufactured with a pull down resistor network. The switch that activates the circuit which I'm trying to detect goes to ground when pushed. True, I can use...
  16. Replies
    7
    Views
    2,981

    Re: quick question 12F683

    Thank you Henrik. I need to find another way to detect when the circuit is active.
  17. Replies
    7
    Views
    2,981

    quick question 12F683

    Hello all. I'm running a 12F683 at 3.3V. One of the GPIO's is connected to a place in a circuit that rises to only 1.2V when it's activated. Is this enough voltage to reliably support the code "if...
  18. Replies
    4
    Views
    1,877

    quick question

    I have 4 identical circuits. If I put at the top of each program:

    X var word
    pause x

    and power up all 4 at the same time, will X be a random number on each of them? The idea here is to make...
  19. Re: How to set HPWM to generate 38khz signal? (16F870)

    Hello. A while back I used this routine to generate 38KHZ with a 12F675 running at 4MHZ.

    STARTBIT:
    High GPIO.4 'GETTING 38KHZ WITH THIS SUBROUTINE
    High GPIO.4
    Low GPIO.4
    Low GPIO.4

    LET X =...
  20. Re: Help Choosing the correct PIC for 2 Channel PWM

    I don't think you will be able to generate 2 distinct tones. From the PBP manual:

    Frequency is the desired frequency of the PWM signal. On devices
    with 2 channels, the Frequency must be the same...
  21. Replies
    16
    Views
    4,737

    Re: Monitor supply voltage of chip?

    I recently made a low battery warning for a 12V lead acid battery using a 12F675. B+ 12V powers the PIC through a 3.3V LDO regulator.The same B+ 12V goes to the ADC pin through a 220K resistor. The...
  22. Replies
    2
    Views
    1,768

    Re: 16F819 config for A/D

    Hi. I've used this routine many times without a problem Try it.

    OSCCON = $70 '8mhz
    adcon1 = 7 'set inputs to all digital - adcin command will convert individual input to analog
    @ DEVICE...
  23. Replies
    10
    Views
    2,942

    Re: Soft-start for mains LEDs?

    I'm sorry I wasn't clear in my original post. Of course I didn't do the brightness thing with an LED replacement bulb. It was to slowly start an AC motor but the same process would work with AC...
  24. Replies
    10
    Views
    2,942

    Re: Soft-start for mains LEDs?

    Yes. In about 1980 a buddy of mine had a digital LED wristwatch, LED calculators and alarm clocks were becoming popular. Google it. LED's were around since the 70's.
  25. Replies
    10
    Views
    2,942

    Re: Soft-start for mains LEDs?

    Sorry Anand. This was at least 20 years ago. All I remember is building a dimmer circuit and modifying the section that used the potentiometer to control the brightness. If I had to do it all over...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4