I have allready looked here:
[broken link]
I am using UART1. 1 Mhz internal clock.
With the discarded It is telling me that it is a config issue. (but close)
Code is attached. Any help you can provide would be extreamly helpfull. I am not a ASM guy. So, this is new teritory....
2015-03-11, 07:05:28 (This post was last modified: 2015-03-11, 07:11:57 by richcj10.)
(2015-03-06, 14:43:07)Mikael Gustavsson Wrote: Hi,
You say 1MHz but the code comment says 16MHz. Which is it?
I had the 16 Mhz stuff comented out. I did how ever change it to 16 Mhz
Code:
; Set internal oscillator to 16MHz
movlw 0x72
movwf OSCCON
movlw 0x04
movwf OSCCON2
Code:
;------------------------------------------------------------------------------
; User preferences
;------------------------------------------------------------------------------
radix DEC
#define OSCF 16000000 ;xxx oscillator frequency (including pll)
#define BLINIT 2000 ;xxx hello receive timeout [ms]
#define HELLOTRIES 2 ;xxx number of non hello characters received before branching to the user application
#define BLTIME 2000 ;xxx data receive timeout [ms]
;------------------------------------------------------------------------------
; UART settings
;------------------------------------------------------------------------------
#define USE_UART1 1 ;xxx uncomment to use uart1
;#define USE_UART2 1 ;xxx uncomment to use uart2
#define BAUDRATE 19200 ;xxx baudrate
;#define USE_ABAUD 1 ;xxx uncomment to use auto baud rate detection, READ ERRATA FIRST
#define USE_BRG16 1 ;xxx uncomment to use 16-bit brg
;#define USE_TXENABLE 1 ;xxx uncomment to use a tx enable pin
ifdef USE_TXENABLE
#define TXE_DELAY 10 ;xxx time in us to wait before transmitting after pulling the tx enable pin high
#define TRISR_TXE TRISD ;xxx tris register containing tx enable
#define LATR_TXE LATD ;xxx port register containing tx enable
#define TRISB_TXE TRISD0 ;xxx tris bit for tx enable
#define LATB_TXE RD0 ;xxx port bit for tx enable
endif