Search Results - MEL PICBASIC Forum


Search:

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

Page 1 of 4 1 2 3 4

Search: Search took 0.00 seconds.

  1. Thread: Goodbye

    by peterdeco1
    Replies
    58
    Views
    16,152

    Re: Goodbye

    Look at the date of post #57. It is mind-boggling what has gone on in the world since then. I hope all of you who said goodbye are well.
  2. Replies
    4
    Views
    829

    Re: Power Saving on 16f628

    Just my 2 cents here. On most of my 16F819 projects idling current is about 5mA. When I add NAP 0, it drops to 1/2 mA. I put it at the top of the program where it's waiting for something such as a...
  3. Re: Advices required for Soap dispenser / sanitizer code

    At work, we make a product that detects hand motion to light up a string of LED's. You can use a FET to drive the soap pump motor. We use the ADC in a 12F675 to detect fluctuations from a 5528 LDR....
  4. Replies
    10
    Views
    1,700

    Re: 12F683 _CONFIG problem

    Yes it is old. I think it's version 2.65 or something.
  5. Replies
    10
    Views
    1,700

    Re: 12F683 _CONFIG problem

    I have used the following header for the 12F683 many times and never encountered any compiling problems. Try it.

    CMCON0 = 7 'comparators off
    ANSEL = 0 'all inputs digital, the adcin command...
  6. 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
  7. Replies
    27
    Views
    3,465

    Re: How to prevent variable going below zero?

    I like Tumbleweed's code. Shorter and more to the point.
  8. Replies
    27
    Views
    3,465

    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
  9. Thread: Mplab icd 2

    by peterdeco1
    Replies
    1
    Views
    913

    Mplab icd 2

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

    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...
  11. Replies
    7
    Views
    1,349

    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.
  12. Replies
    7
    Views
    1,349

    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.
  13. Replies
    4
    Views
    1,037

    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...
  14. Re: I hope everybody is having a Great and Merry Xmas...

    Merry Christmas and Happy New Year to All.
  15. Replies
    13
    Views
    5,513

    Re: Forum Adverts

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

    Re: For ALL of you in the STATES

    It's hot here in New York too Dave.
  17. Replies
    1
    Views
    1,381

    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
  18. Thread: amp hours

    by peterdeco1
    Replies
    1
    Views
    2,038

    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...
  19. Replies
    7
    Views
    3,322

    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...
  20. Replies
    7
    Views
    3,322

    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...
  21. Replies
    7
    Views
    3,322

    Re: quick question 12F683

    Thank you Henrik. I need to find another way to detect when the circuit is active.
  22. Replies
    7
    Views
    3,322

    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...
  23. Replies
    4
    Views
    2,344

    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...
  24. 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 =...
  25. 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...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4