1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

characteristics and apps: PIC16F870

Discussion in 'Microcontrollers' started by sardineta, Oct 1, 2004.

  1. sardineta

    sardineta New Member

    Joined:
    Sep 27, 2004
    Messages:
    131
    Likes:
    0
    Location:
    Cuernavaca Morelos
    How I limit the current in the op-amp, I have no idea, Using a resistor as if it was a transistor, between Voltage source and collector.

    Sorry, I do not have in mind how the preset has to be. If it is a negative DC voltage a capacitor can stop it?

    What does a series resistor do between the output and the input to the PIC.


    Thanks a lot for the comment!
     
  2. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,205
    Likes:
    640
    Location:
    Derbyshire, UK
    You a resistor feeding to the PIC, as below.

    Assuming your opamps don't have DC offset inputs?, you can fit a potentiometer between +/-9V, with a resistor feeding to one of the first opamp input pins - try something like a 100K resistor.

    It limits the current you can feed into the PIC input pin. The datasheet for the PIC gives a value for the minimum source impedance, you should use a value close to that. If you look at my PIC tutorials the analogue hardware shows you what I mean - I actually used 2K7 resistors.
     
  3. sardineta

    sardineta New Member

    Joined:
    Sep 27, 2004
    Messages:
    131
    Likes:
    0
    Location:
    Cuernavaca Morelos
    The pot should be like this:
    Yes, the om amp does not have offset

    what op-amp you recommend me to connect.
    Ux es some of the U1, U2, U3 or U4 (figure above) and to what input + or - ?
     

    Attached Files:

    • pot.jpg
      pot.jpg
      File size:
      3.8 KB
      Views:
      870
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. sardineta

    sardineta New Member

    Joined:
    Sep 27, 2004
    Messages:
    131
    Likes:
    0
    Location:
    Cuernavaca Morelos

    Ok, I think the DC level I got was due to I didn't connect + terminal to ground in the Full Wave Rectifier stage.

    :!:
     
  6. sardineta

    sardineta New Member

    Joined:
    Sep 27, 2004
    Messages:
    131
    Likes:
    0
    Location:
    Cuernavaca Morelos
    Does anyone know how to avoid bounces?

    I have a switch I check if it is open or close by RB0, it activates an interrupt, but I think between the transition I have more than one event, so I would like to know a way to avoid bounces.

    I have a resistor of 10k one leg is to 5v, and the other to RB0, the switch is connected to RB0 and the other leg of the switch to gnd. so when closed RB0 sees gnd, (interrupt high to low)

    :?:

    is there a way to stop the overflow of the T0IE when TMR0 is configured to internal clock, while a delay is occurring and then to make it run again conserving the actual value of TMR0. I don't want a interrupt event from T0IF while a delay is occurring.
     
  7. samcheetah

    samcheetah New Member

    Joined:
    Dec 30, 2003
    Messages:
    872
    Likes:
    0
    Location:
    Pakistan
    switch debouncing is a very common techniques used to introduce a little delay in reading a switch. there are different techniques for different types of switches. for an SPST switch a RC network can be used or a delay in the software can be used. and for an SPDT switch you can use a latch.

    you should look at Nigel's tutorials where he uses a debouncing technique.

    http://www.winpicprog.co.uk/pic_tutorial9.htm
     
  8. williB

    williB New Member

    Joined:
    Aug 30, 2004
    Messages:
    2,217
    Likes:
    3
    Location:
    New Jersey

    Attached Files:

  9. williB

    williB New Member

    Joined:
    Aug 30, 2004
    Messages:
    2,217
    Likes:
    3
    Location:
    New Jersey
    i personally like the SR debouncer..
    but it requires a different type of switch..
     
  10. sardineta

    sardineta New Member

    Joined:
    Sep 27, 2004
    Messages:
    131
    Likes:
    0
    Location:
    Cuernavaca Morelos
    Thanks a lot for the comment!!!
    :D
     
  11. sardineta

    sardineta New Member

    Joined:
    Sep 27, 2004
    Messages:
    131
    Likes:
    0
    Location:
    Cuernavaca Morelos
    Does anyone knows how the stack registers can be used.

    how they work?
    I know that the 870 has 8 stack registers but I do not know how they work
    thanks
     
  12. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,205
    Likes:
    640
    Location:
    Derbyshire, UK
    Like any stack they are automatic in use, when you perform a CALL the return adress is stored there, when you perform a RETURN the return address is taken off and the program jumps to that address.

    You shouldn't generally mess about with them yourself, particularly on a PIC where you only have a very small stack.
     
  13. sardineta

    sardineta New Member

    Joined:
    Sep 27, 2004
    Messages:
    131
    Likes:
    0
    Location:
    Cuernavaca Morelos
    Regulator

    I havent seen that my 5v ergulator gets warm, I do not know if it is possible, there are just 3 components the regulator feeds: the microcontroler 16F870, which two pins from port C turn on two leds, permanently; the series of 10k to the 100 ohm to avoid the reset.
    and another array of resistor 10k + a forward diode + 1 Mohm to ground

    the device is the L7805CV

    Thanks in advanced
     
  14. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,205
    Likes:
    640
    Location:
    Derbyshire, UK
    Do you have the two required capacitors as close as possible to the 7805?.
     
  15. sardineta

    sardineta New Member

    Joined:
    Sep 27, 2004
    Messages:
    131
    Likes:
    0
    Location:
    Cuernavaca Morelos
    Last edited by a moderator: Dec 26, 2013
  16. sardineta

    sardineta New Member

    Joined:
    Sep 27, 2004
    Messages:
    131
    Likes:
    0
    Location:
    Cuernavaca Morelos
    circuit

    sdfs
     

    Attached Files:

  17. sardineta

    sardineta New Member

    Joined:
    Sep 27, 2004
    Messages:
    131
    Likes:
    0
    Location:
    Cuernavaca Morelos
    almost finished

    I have already done a home-made circuit board, however I found that some noise is inserted trhough the ground path, so The ADC catch a bad read an then opens the interruptor, I read the signal by RA0/AN0 pin from the PIC16F870

    What you recommend me to do in order to stop this transient voltage in the ground path?

    does a varistor and a ceramic capacitor of .1uF both of them connected in parallel in the AC main line will correct this kind of noise?

    this transient voltages appear when I turn on/off an electronic device or a flourescent lamp?

    I checked the ground paths but they still appear
    here is the printed circuit board, and all diagrams are in this topic

    Thank in advanced!, Happy new year!
     

    Attached Files:

  18. sardineta

    sardineta New Member

    Joined:
    Sep 27, 2004
    Messages:
    131
    Likes:
    0
    Location:
    Cuernavaca Morelos
    This is the noise I see using the oscilloscope
    in the RA0/AN0 pin of the PIC16F870
     

    Attached Files:

Share This Page