12F1840 config issues


Results 1 to 14 of 14

Threaded View

  1. #1
    Join Date
    Jul 2003
    Location
    Lancashire
    Posts
    50

    Default 12F1840 config issues

    Hi All
    I searched for an answer to this but came up blank. The program has been reduced to a single serout2 command to test. It works fine on both a 12F683 and 16F688 with the correct configs but I cant seem to get it to function on the 12F1840. There is data out but its garbage and clearly the wrong baud rate. I suspect I have not configured something, probably the oscillator correctly so requesting help. Its probably obvious but I cant spot it.
    Cheers Pete

    Code: PBP3
    Code:
    #CONFIG
    
    	__CONFIG	_CONFIG1, _FOSC_INTOSC & _WDTE_ON & _PWRTE_ON & _MCLRE_ON & _BOREN_OFF
    	__CONFIG	_CONFIG2, _PLLEN_ON & _BORV_LO & _LVP_OFF
    
    #ENDCONFIG
    
    OPTION_REG	= %10000001
    WPUA		= %00000000    'weak pull ups disabled
    ANSELA             = %00000000    'Select all digital
    TRISA               = %00001101	   ' Make A0,A2,A3 inputs,A1,A4,A5 outputs
                               
    OSCCON      = %11110000    'SET INTOSC TO 32MHZ 
    OSCTUNE     = %00000000
    
    INTCON 		= 0            'Latch out interrupt
    CM1CON0		= 0            'disable  comparators
    FVRCON		= 0            'Fixed voltage reference disabled
    
    
    DEFINE OSC 32
    
    Test:
    serout2 PORTA.5,16468,["Testing",13,10]
    
    pause 1000
    goto Test
    Last edited by Archangel; - 14th February 2015 at 10:22.

Similar Threads

  1. Problem converting 12F683 code to 12F1840
    By RossWaddell in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 14th March 2013, 01:55
  2. PBP Support for 12F1840 8-Pin Device?
    By springtank in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 10th November 2012, 08:32
  3. Timer1 issues
    By mitchf14 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th January 2009, 16:21
  4. 12c508a Device Config. And Burning Issues
    By sayzer in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th March 2006, 16:50

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