CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Initialisation with PIC18f65j90

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Beurk



Joined: 03 Nov 2017
Posts: 2

View user's profile Send private message

Initialisation with PIC18f65j90
PostPosted: Fri Nov 03, 2017 1:34 am     Reply with quote

Hi guys,


I have some issues with the configuration of my PIC18F65j90. I use this pic for drive a LCD screen in 1/4Mux and 1/3 Bias.

You can found the datasheet of the LCD screen right here : http://www.good-display.com/products_detail/productId=240.html

I have used the following steps for the initialisation of the PIC. On each I/O pins of the PIC, i have 1.25V DC.
Code:
//==============================================
//-----------------------------------Bit COnfiguration-----------------------------
//==============================================
// CONFIG1L
#pragma config WDTEN = ON       // Watchdog Timer Enable bit (WDT enabled)
#pragma config STVREN = ON      // Stack Overflow/Underflow Reset Enable bit (Reset on stack overflow/underflow enabled)
#pragma config XINST = OFF      // Extended Instruction Set Enable bit (Instruction set extension and Indexed Addressing mode disabled (Legacy mode))

// CONFIG1H
#pragma config CP0 = OFF        // Code Protection bit (Program memory is not code-protected)

// CONFIG2L
#pragma config FOSC2 = ON       // Default/Reset System Clock Select bit (Clock selected by FOSC1:FOSC0 as system clock is enabled when OSCCON<1:0> = 00)
#pragma config FOSC = HS        // Oscillator Selection bits (HS oscillator)
#pragma config FCMEN = OFF      // Fail-Safe Clock Monitor Enable bit (Fail-Safe Clock Monitor disabled)
#pragma config IESO = OFF       // Two-Speed Start-up (Internal/External Oscillator Switchover) Control bit (Two-Speed Start-up disabled)

// CONFIG2H
#pragma config WDTPS = 256   // Watchdog Timer Postscaler Select bits (1:256)

// CONFIG3L

// CONFIG3H
#pragma config CCP2MX = ALTERNATE// CCP2 MUX bit (CCP2 is multiplexed with RE7)

// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.

#include <xc.h>


Please any advice would help me. Thanks in advance.

Beurk-Switzerland
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Fri Nov 03, 2017 1:50 am     Reply with quote

Are you using CCS C?.

This is a forum for CCS C, not other C's. Though CCS C can use the syntax you are showing, what you are posting is the core syntax for another C like Microchip C.
xc.h is the Microchip header file, not the CCS one.
You need to be going to the Microchip forum....

The command to configure the LCD in CCS, is 'setup_lcd'....
Beurk



Joined: 03 Nov 2017
Posts: 2

View user's profile Send private message

PostPosted: Fri Nov 03, 2017 2:10 am     Reply with quote

ok thank you for your answer
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group