serin2/serout2


Closed Thread
Results 1 to 15 of 15

Thread: serin2/serout2

Hybrid View

  1. #1

    Default serin2/serout2

    Just a quick question, using a 16F628A, does it make any difference which pin I use on porta or portb and on pin porta.4 would there be any issues using it for serin? Thanks

  2. #2
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by tazntex View Post
    Just a quick question, using a 16F628A, does it make any difference which pin I use on porta or portb and on pin porta.4 would there be any issues using it for serin? Thanks
    Doesn't make much of a difference....but it could.
    Some pins are TTL, some are schmidt trigger inputs...if your voltages are marginal, some pins might respond while others don't.
    All pins are CMOS outputs, except RA.4 which is an open-drain, which could be an advantage in some situations.
    Info on this is in the Electrical Specification section of the datasheet.

  3. #3

    Default

    Thanks Skimask, the reason why I ask is that I was using ra.3 as serout and all was well and great. After reading the datasheet and seeing that if I later decided to use the usart I would need to use portb.2. Once I changed the pins this morning not it constantly transmits. I haven't changed anything, but portb.2 was an input and porta.3 the output. Once I switch back all is good.

  4. #4
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by tazntex View Post
    After reading the datasheet and seeing that if I later decided to use the usart I would need to use portb.2. Once I changed the pins this morning not it constantly transmits. I haven't changed anything, but portb.2 was an input and porta.3 the output. Once I switch back all is good.
    So, you tried to use PortB.2 for SEROUT and it didn't work? Went back to A.3 and it was working again?
    One sentence up there doesn't quite make sense...
    - Once I changed the pins this morning not it constantly transmits -
    Could you rephrase that a bit? Doesn't quite add up...

  5. #5

    Default

    Ok, I have been using porta.3 as my serial out and portb.2 was an input from a switch,when the switch was on data was sent out porta.3. I swapped these two and change serial out portb.2 and connected my switch to porta.3. I changed trisa and trisb to along with my variable. Once I did this, as soon as the pic is powered up portb.2 sends data out forever.
    I removed everything from the program with the exception of serout label. It still transmits. That was why I asked whether or not certain pins could not be used or used without adding something to the circuit. Thanks again Skimask, hopefully I am making some sense.

  6. #6
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by tazntex View Post
    Ok, I have been using porta.3 as my serial out and portb.2 was an input from a switch,when the switch was on data was sent out porta.3. I swapped these two and change serial out portb.2 and connected my switch to porta.3. I changed trisa and trisb to along with my variable. Once I did this, as soon as the pic is powered up portb.2 sends data out forever.
    I removed everything from the program with the exception of serout label. It still transmits. That was why I asked whether or not certain pins could not be used or used without adding something to the circuit. Thanks again Skimask, hopefully I am making some sense.
    Ok, that makes a bit more sense.
    Did you do anything else to PortA.3 to make it work for you?
    Anything at all?

Similar Threads

  1. PIC to PIC "wired" serial one-way communication - SERIN2/SEROUT2
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th April 2008, 20:02
  2. Serin2/Serout2 Question
    By scottl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th November 2007, 09:11
  3. Help SERIN2/SEROUT2
    By mike20200 in forum mel PIC BASIC
    Replies: 3
    Last Post: - 5th September 2007, 06:19
  4. Serin2/Serout2 PIC 2 PIC
    By actionplus in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2004, 06:46

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