16f887 and hserin/out


Closed Thread
Results 1 to 13 of 13

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Hi Dennis,
    Ok so far here is what I see
    use this config: @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF & _PWRTE_OFF & _FCMEN_OFF

    use this
    OSCTUNE = 0 ' sets osc to calibrated value
    Mr._e's code ain't going to work on the 690 without changes because your USART is on portB
    so comment out the include keypad.bas
    throw this in before your tris statements
    PortA = 0
    PortB = 0
    PortC = 0
    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.

  2. #2


    Did you find this post helpful? Yes | No

    Default no go Joe !

    Hi Joe

    Thanks for the tips ...
    Have made the changes, set the fuses,cleared the VAR's checked the TRIS, removed the kepad include(accidently slipped in in somehow")....
    and still no luck :-(

    Any other ideas or tips ?



    Kind regards
    Dennis

  3. #3


    Did you find this post helpful? Yes | No

    Default Speed kills :-)

    YAY ...I'm now back at my original problem which prompted me to start this thread :-) or :-( ?

    In post #9 here I had used the wrong settings for the usart , if you look carefully you'll see that the values are set for 4 MHz and I had set to use the internal clock @ 8 MHz. I changed to use internal clock @ 4MHz and now at least I get values in hyperterminal....b ut they are WRONG !

    The HSEROUT line from the 18F4520 is as follows:
    [code]
    TRAIN VAR BYTE
    train = $B3
    SYNK VAR BYTE
    SYNK = $7E

    XNUM VAR BYTE
    YNUM VAR BYTE
    ZNUM VAR BYTE
    hserout [TRAIN,SYNK,XNUM,YNUM,ZNUM,$d,$a]
    [code]
    It works perfectly ... I can see the values in hyperterminal/MCS serial tool window as they are sent!
    So I see this
    ³~dE
    That's the numbers $B3,$7E,31,100,69

    Now when I'm at the receiver side the numbers I receiver PIC side are way different ...
    Here's the receiver code
    Code:
    hserin [WAIT(SYNK),XNUM,YNUM,ZNUM]
        
    ' and now out to hyperterminal (or wherever!)
        hserout["X-",DEC XNUM," Y-",DEC YNUM," Z-",DEC ZNUM,$d,$a] 'to hyperterminal
    Here's what I get in MCS serial tool window /hyperterminal

    X-71 Y-84 Z-53
    X-71 Y-84 Z-53
    X-71 Y-80 Z-53
    X-71 Y-80 Z-53
    X-71 Y-80 Z-53
    This should be X- 31,Y-100,Z-69
    These are completely di8fferent to what I am sending !

    This is really confuising ... can anyone see what I am doing wrong ?

    Kind regards
    Dennis

  4. #4


    Did you find this post helpful? Yes | No

    Default un-resolved!

    I have replaced the 16F690 with a 16f887 .... and now it's all working like a charm ... either it's me who has missed something or has overlooked something crucial or I have a dodgy 16f690.

    If anyone has suggestions please feel free to leave a message here.

    Kind regards

    Dennis

Similar Threads

  1. HSERIN/OUT Wrong
    By Kaldurenik in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 8th October 2007, 10:40
  2. HSERIN/OUT or Serin/Out for AIR Link
    By mankan in forum General
    Replies: 4
    Last Post: - 25th May 2006, 15:19
  3. Hserin
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 20th March 2006, 23:09

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