Well,
I've still some trouble. Characters appears but nothing consitant or logical.
I have attached both explanations I have about how to send commands to the display (in German "D" and English "E"). Don't be afraid, they're very short.
The display is directly connected through a 1k resistor to the PIC.
I've set the baudrate to 300 now; but still strange characters appear.
I have also tried out all the 300bds and 2400bds modes described in the Compiler's manual without any success.
Here's my code:
Code:
'-------------------------------------------------------------------------------
' Fuses
@ DEVICE PIC16F88,INTRC_OSC_NOCLKOUT
@ DEVICE PIC16F88,PROTECT_OFF
@ DEVICE PIC16F88,WDT_OFF
@ DEVICE PIC16F88,PWRT_ON
@ DEVICE PIC16F88,MCLR_ON
@ DEVICE PIC16F88,BOD_OFF
@ DEVICE PIC16F88,LVP_OFF
@ DEVICE PIC16F88,CPD_OFF
@ DEVICE PIC16F88,DEBUG_OFF
@ DEVICE PIC16F88,CCPMX_OFF
'-------------------------------------------------------------------------------
' Registers
PORTB = %00000000 'Drive all ports B low
TRISB = %00000000 'Segments - Set Inputs/Outputs on PORTBs (direction)
OSCCON = %01100000 'Internal RC set to 4MHz
ANSEL = %00000000 'Disable Analogue Inputs
ADCON0 = %00000000 'A/D converter is OFF
'-------------------------------------------------------------------------------
' Circuitery
'PORTB.0 = TX
'-------------------------------------------------------------------------------
' Init
DEFINE SER2_BITS 8 'Set number of data bits for Serin2 and Serout2
'DEFINE SER2_ODD 1 'Use odd parity instead of even parity
Data_Out VAR PORTB.0
'-------------------------------------------------------------------------------
' Program
pause 1000 'Stabilize the PIC (mybe not needed)
serout2 data_out , 36081, [27,76,$0]
end
Any idea what I'm doing wrong?
Bookmarks