RS232 comms - need help with datasheet


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Were things stable at that? Problems? Could be handy if all went well...
    Hi, Dave

    Operation was stable with a perfectly stable and decoupled supply and virtually "no" load at the outputs ( all pins carefully buffered ) ...
    also @ room temp ( did not test it in the fridge ! )

    but I wouldn' try it aboard my model planes ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    but I wouldn' try it aboard my model planes ...
    Then I will leave it alone
    Thanks
    Dave
    Always wear safety glasses while programming.

  3. #3
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Guys thanks very much for your quick input

    I have a hardware file which is then included in the main program. The config settings are
    Code:
    ASM  
      __CONFIG    _CONFIG1H, _OSC_HSPLL_1H
      __CONFIG    _CONFIG2L, _PWRT_ON_2L  
      __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
      __CONFIG    _CONFIG3H, _PBADEN_OFF_3H
      __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
    ENDASM
    DEFINE  OSC 48
    'DEFINE  OSC 20  ; config settings 18F4580, 10mhz crystal
    ADCON1 = $0F
    I don't have a 12 Mhz crystal at the moment, but have tried with a 10Mhz one and the slowness is causing other issues with timings of the PID loops etc, I also don't get any hieroglyphics, but I only get a blank screen with a flashing cursor. So I'll pop down and get a few 12Mhz xtals from a local component suppliers and see what that does, as I really need to run this PIC as fast as it goes, and would like to resolve the comms issue.

    Thanks once again for your input,

    Sorry noticed I hadn't changed the OSC value

    OK tried this with a 10Mhz xtal, but still no joy - and is seems as slow
    Code:
    ASM  
      __CONFIG    _CONFIG1H, _OSC_HSPLL_1H
      __CONFIG    _CONFIG2L, _PWRT_ON_2L  
      __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
      __CONFIG    _CONFIG3H, _PBADEN_OFF_3H
      __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
    ENDASM
    'DEFINE  OSC 48
    DEFINE  OSC 40  ; config settings 18F4580, 10mhz crystal
    ADCON1 = $0F
    Will try the 12mhz xtal when I get one
    Last edited by malc-c; - 6th August 2010 at 14:19. Reason: noticed an error in the def osc

  4. #4
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    I've had no luck with the local electronics store, so have had to order online. Whilst waiting I noticed that the data sheet mentions
    RS-232 operation using internal oscillator
    block (no external crystal required)
    I can't figure out if this is possible irrespective of using an external crystal. If it is possible to use an internal 32mhz internal oscillator for the comms and the external to run the PIC then could someone advise me how to configure the comms definition bits and registers.

    Thanks

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    This in the config will set the internal OSC to on with I/O on RA6 and RA&
    _OSC_IRCIO67_1H

    Set the internal to 8MHz
    OSCCON = %01110000 '8 Mhz

    PLL the internal
    OSCTUNE = %01000000

    Then
    DEFINE OSC 32
    Dave
    Always wear safety glasses while programming.

  6. #6
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Dave,

    As always, thanks for the quick reply. I'll give it a go and see how it performs

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