serin/hserin fail when i break the standard...


Results 1 to 18 of 18

Threaded View

  1. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    If you have a Hardware COMPARATOR on the PIC, put your 3v SERIAL into one pin, set a low voltage Reference - say around 1v-2v (using the conveniently provided Voltage Reference Module of the PIC), and cross-connect the Hardware OUTPUT of the Comparator to either your USART input on the PIC or your chosen PIC pin for ASYNC Comms.

    Hey presto... you have your very own personal Voltage Convertor... and other than the software initialisation at the start of your program, no further software is required - so won't affect any critical timekeeping or interrupts or anything.

    What's even better, you can INVERT the Comparators output simply in SOFTWARE by setting the appropriate Register Bit... so you also have your own programmable HARDWARE INVERTOR... throw your MAX232 in the bin - your PIC (if it has Comparators) has one BUILT IN!!!!

    And if anyone is still using MAX232's for INPUT to a PIC... why??? The chances are if your PIC has a USART (like the 16F628), then it's probably got COMPARATORS too... so use them!

    Remember... your COMPARATOR's OUTPUT will swing 0v-Vdd (ie 0-5v on a 5v PIC) as long as the INPUT to the comparator reaches or exceeds the REFERENCE VOLTAGE. So if you have SERIAL Comms at say 15mV out of a Radio Receiver... feed it STRAIGHT into your Comparator, set the Reference to 10mV and suddenly you've got an amplified 0-5v SERIAL appearing on the Comparators Hardware OUTPUT pin.

    C'mon... if you've got a COMPARATOR you can rule the world!!!....
    Last edited by Melanie; - 25th March 2010 at 13:12.

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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