RB0 + Internal Pullup + Interrupt


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    May 2008
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    I've just finished testing the USB-Serial cable, and it appears to be working.

    I've hooked it up TX-RX, RX-TX, GND-GND to a PC serial port (Real hardware kind) and I can send and recieve data to and from the device without any form of corruption.

    Which brings me back to my original query... are the pullup's in the PIC breaking my serial communications?

    If so, can anyone come up with a simple way to re-do the input detection of the buttons? (I have spare pins on the pic if that helps )

    Edit:

    Actually I think I found the answer to my problem "The HW USART output is inverted as it is designed to work with an RS232 driver." that means I must have built my FT232 circuit to use the inverted output/input (the FT232 chip is very smart, I just don't remember doing that...) I haven't been using a max232 chip on this project because the voltages were within tolerance, and I just don't have the room... maybe I'll have to build an external serial adapter...
    Last edited by Freman; - 10th August 2009 at 02:48.

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Freman View Post
    I've just finished testing the USB-Serial cable, and it appears to be working.

    I've hooked it up TX-RX, RX-TX, GND-GND to a PC serial port (Real hardware kind) and I can send and recieve data to and from the device without any form of corruption.

    Which brings me back to my original query... are the pullup's in the PIC breaking my serial communications?

    If so, can anyone come up with a simple way to re-do the input detection of the buttons? (I have spare pins on the pic if that helps )

    Edit:

    Actually I think I found the answer to my problem "The HW USART output is inverted as it is designed to work with an RS232 driver." that means I must have built my FT232 circuit to use the inverted output/input (the FT232 chip is very smart, I just don't remember doing that...) I haven't been using a max232 chip on this project because the voltages were within tolerance, and I just don't have the room... maybe I'll have to build an external serial adapter...
    Hi Freman,
    I have never used HSEROUT . HSERIN requires you to send data to it TRUE, and idles in the HIGH state. This from the data sheet . . . <b>
    "The USART’s transmitter and receiver are functionally
    independent but use the same data format and baud rate." </b>
    and this:
    <b> "Clearing enable bit TXEN during a transmission will cause the
    transmission to be aborted and will Reset the
    transmitter. As a result the RB2/TX/CK pin will revert to
    hi-impedance."</b>
    This suggests to me it transmits TRUE too. Fact is I do not know, but the evidence suggests it.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I haven't been using a max232 chip on this project because the voltages were within tolerance, and I just don't have the room... maybe I'll have to build an external serial adapter...
    I think that solves it. Look at the PBP manual.
    Install an inverter as the manual states when using hardware serial or change your code to software, SERIN2/SEROUT2, and get back with us.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    May 2008
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    *sigh* Just another one of the things that leave me asking WTF were they thinking when they designed these chips... oh well..

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Freman View Post
    *sigh* Just another one of the things that leave me asking WTF were they thinking when they designed these chips... oh well..
    I bet they had a good reason.... Who knows what it was. Might be that a 232 type chip can bring the levels up to true RS232 levels that a micro can not because of the voltage they run at.

    Most times the software solution will work and you then have the benifit of using most any pin. About the only time I use hardware (HSERIN/OUT) is if I need it running in the background as in an interrupt. Of course if something else triggers the interrupt then you can have the software routine in that interrupt.

    All kinds of possibilities.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 02:35
  2. RB0 interrupt problems
    By amindzo in forum General
    Replies: 1
    Last Post: - 26th August 2006, 11:52
  3. NEWBIE: Some basic questions using interrupts
    By JackPollack in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th March 2006, 02:59
  4. Interrupt Problem
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th November 2005, 20:58
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

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