Can anyone help a newcomer?


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Smile Welcome

    Hi, Scopit

    a small piece of scheme showing , at least, the optobarrier + Pic input connection + supply could be very useful too.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Oct 2009
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Scopit

    a small piece of scheme showing , at least, the optobarrier + Pic input connection + supply could be very useful too.

    Alain
    Hi Alain
    I don't have a good schematic tool but I hope the attached picture from the HOA2001 datasheet helps. I have added some comments on the connections.
    Thanks.
    Scopit
    Attached Images Attached Images  

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Question

    I note your Tx diode is rated @ 10 mA If ...

    you use 3.4 mA ...

    may be a bit weak ... try 330 Ohms.

    BTW did you verify the pic input ( out of the board ) with an Ohmmeter ???

    Could you describe the supply ??? ( regulator, capacitors value, Pic decoupling ? , Opto decoupling ? - HOA datasheet tells about ...)

    any .1µF between Pic supply Pins ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Oct 2009
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Alain
    Thanks for the input on the Tx diode. I have checked the output of the opto encoder and the pin is toggling so I am assuming the diode is working.
    I am using screw terminals to wire up the opto coupler and I have tested the connection to RB0 and it's good. I can also put a wire between the screw terminal and 5V and I can trigger the interrupt.

    The power supply is a regulated DC 6V 300mA plug type. On the board have a 7805 regulator with 10uf + 100nF decoupling capacitors. I have 100nF at the opto encoder supply.

    Thanks
    Danny

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi,

    Interrupts seem to be Valid ( Why use another name for INTCON reg ???)

    ... I will try the bread board now ...

    Alain
    Last edited by Acetronics2; - 17th October 2009 at 15:55.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Oct 2009
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Why use another name for INTCON reg ???
    This was because I could not get the interrupts to work at first. I didn't know if there was a problem to use INTCON and so I changed it. I did the same with OPTION....it was just desperation I spent hours on this!
    The problem appeared to be that I was using MOVFW to write to INTCON. Once I change to BCF/BSF everything worked!

  7. #7
    Join Date
    Oct 2009
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Alain
    I took your advice and increased the TX diode current. At the same time I tried a weak pull up on the output of the optical encoder. This seems to have done the trick and the interrupt is now being triggered.
    Thanks very much to you and Jerson for taking the time to help me.
    I will stay on the forum, it's a very useful resource.
    Danny

  8. #8
    Join Date
    Feb 2003
    Location
    Sydney, Australia
    Posts
    126


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scopit View Post
    The power supply is a regulated DC 6V 300mA plug type. On the board have a 7805 regulator with 10uf + 100nF decoupling capacitors. I have 100nF at the opto encoder supply.
    That 6v adaptor won't give a lot of headroom to the 5v reg if it is a standard 7805 style one - this might cause inconsistencies if it is borderline on the regulation and cannot supply the current for the opto LED. I always design at least 2 and ideally over 3v more input than the output of the reg.
    Do you have a 9v DC plug pack you could try ?

    Bill.

  9. #9
    Join Date
    Oct 2009
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by bcd View Post
    Do you have a 9v DC plug pack you could try ?
    Bill.
    Hi Bill
    The plug pack is switchable, I'll up it to 7.5 & 9v and see if it makes a difference.
    I suspect the problem is between the receiver and the PIC as the input to RB0 is clamped at 1.65V.
    But at the moment, I'll try anything!
    Thanks for the input and I'll get back to you once I've tested
    Danny

  10. #10
    Join Date
    Oct 2009
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Here's the latest!

    I have upped the PSU voltage and checked all the connections.With a pull up resistor the optical encoder output switches between 1.3 and 4.4 volts.

    It will trigger the interrupt the first time it goes high. No further interrupts occur.
    If I reset with encoder output low, then the first low low to high transition triggers the interrupt.
    If I reset with encoder output high, then the interrupt is not triggered.

    If I replace the encoder output with a switch to 5volts, I can trigger multiple interrupts so the software looks like it's working.

    Any ideas anyone?
    Thanks
    Danny

Similar Threads

  1. Hlp - newcomer getting confused
    By chunk in forum General
    Replies: 1
    Last Post: - 23rd January 2006, 18:47
  2. 12F629 config help for newcomer
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 4th January 2004, 22:03

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts