16F913 setup


Closed Thread
Results 1 to 32 of 32

Thread: 16F913 setup

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    This should send out hello each 0.5 sec 9600 baud even parity instead i get 4 "Ξ" Simbols on hyper terminal, i have checked all the regesters and it seems to be ok, any body got any Suggestions??

    DEFINE OSC 20 ' Define crystal as 20Mhz

    DEFINE HSER_BAUD 9600 ; 9600 Baud
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 64h ' Enable transmit, BRGH = 1
    DEFINE HSER_BITS 9
    DEFINE HSER_EVEN 1
    DEFINE HSER_CLROERR 1 ; Clear overflow automatically

    TRISA = %00011111 'set PORTA 0-5 as inputs
    TRISC = %10001111 'Set PORTC for serial coms and pins 0 - 3 as inputs
    TRISB = %00000000 'Sert PORTb as outputs and for use with the ICD2

    INTCON = 0 ;Disable interrupts

    loop:
    HSEROUT ["Hallo"]
    PAUSE 500
    goto loop

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


    Did you find this post helpful? Yes | No

    Default

    It works here.. but i don't have the F913.. just the 917, shouldn't be the cause

    Or your Max232 circuit is wrong or you didn't set HS mode before programming your PIC.
    Steve

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

  3. #3


    Did you find this post helpful? Yes | No

    Default

    This is not the smartest of questions but i am using mplab 8 and a ICD2 and can not find were to set the HS mode, if i understand your reply correct it is a programmer option.

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


    Did you find this post helpful? Yes | No

    Default

    You have 2 choice, my favorite is to set the configuration bits in the code see the following
    http://www.picbasic.co.uk/forum/showthread.php?t=543

    Code:
    @        __CONFIG _HS_OSC ; minimal configuration fuse setting
    or in MPLAB, click on Configure menu, then select Configuration bit
    Steve

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

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Not with HyperTerminal!

    Code:
    DEFINE HSER_BAUD 9600 ; 9600 Baud 
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 64h ' Enable transmit, BRGH = 1
    DEFINE HSER_BITS 9
    DEFINE HSER_EVEN 1
    DEFINE HSER_CLROERR 1 ; Clear overflow automatically
    DT

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


    Did you find this post helpful? Yes | No

    Default

    I'm i allowed to not understand???? Hypercrap worked here with that setting... but... erm, i admit i've never ever dare to open the datasheet to read TXSTA settings

    Feel lazy and tired today...
    Steve

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

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hypercrap worked here with that setting...
    Hmmm, interesting...

    Hyperterminal doesn't have a 9-bit option.

    9-bit transmission works with 8-bit reception?
    Very interesting.

    Added: Not being sarcastic... (i know, it's a first)
    It may actually be usefull.
    <br>
    DT

Similar Threads

  1. ADCIN - setup of ADCON2
    By Lowell314 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th December 2009, 18:41
  2. TMR1 external LP xtal setup check
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th October 2009, 18:11
  3. ADCIN setup for PIC16F688
    By PixController in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th February 2008, 18:38
  4. ADCIN setup help need
    By dangill in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th February 2008, 15:22
  5. Use Button For setup
    By tump in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 21st November 2007, 19:43

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