Serial comm - are 2 wires for TX only enough?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    Great,

    I added both ANSEL and CMCON settings as you suggested and it works fine now (I can see "TEST" in the terminal screen).

    I'm going back to the data sheet and try to understand what these settings change to my prog.

    I'll also try to "play" with the oscillator settings since this is not absolutely clear to me at that time.

    Thanx a lot for your help.
    Roger

  2. #2
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    After a few more tests, ANSEL and CMCON don't affect the PIC's behaviour.

    The key seems to be the oscillator OSCON setting.

    Before I got your help, I was using an external 20Mhz ceramic resonator. Nothing worked.

    I changed to the internal oscillator with default settings = 31,25kHz. Nothing worked either.

    To make it work, I set the oscillator to 4MHz as suggested by Mister_e.

    I also tried all the other possible internal oscillator (IRCF) settings; apparently, only 4MHz is working.

    I read the PBP help file under the SEROUT2 command. Nothing specifies that serial communication is working only with 4MHz.

    I'm not using the USART functionality of this PIC. Is there any info I'm missing somewhere else?
    Roger

  3. #3
    Join Date
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default

    Make shure your fuse settings are correct before you program the pic and if you are going to use a 20Mhz oscillator remember to add the line DEFINE OSC 20

    Hope it helps
    Sphere.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Sure the DEFINE OSC 20 have to be inserted... but you have to modify the config fuse too... case not, it will neever ever work

    Look at http://www.picbasic.co.uk/forum/showthread.php?t=543

    you must set the OSC fuse to HS
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. 2 PIC, serial communication
    By lightgreen in forum Serial
    Replies: 6
    Last Post: - 21st November 2009, 16:20
  2. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 18:27
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 03:21
  4. 16F877, DS18S20 and Serial Comm Problem
    By YellowTang in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th April 2004, 11:36
  5. serial comm from Pic to STAMP
    By d1camero in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th April 2004, 00:58

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