Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Programming Error HELP needed..!!

Status
Not open for further replies.

namees22

Junior Member level 2
Joined
Aug 30, 2012
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Ernakulam
Activity points
1,430
hi guys,

as a part of my pic programming i used to address a port pin as LATA.F0(found it from Engineers garage),but my Compiler throws an error for this..so i replaced with LATA0.and it got compiled well but that port isn't responding to my program.am using PIC C18 compiler Lite version.for my PIC18F4550..somebody please help me.
 

could you please explain which port pin you want to address, is it an ADC pin or other??
 

port b for lcd data pins,lcd control pins to port a(1,2,3)...i need to know how exactly port should be addressed..i have used 8052,PIC16F877A...is LATA.F0,LATA.F1,LATA.F2..wrong or LATA0,LATA1,LATA2 ..am not getting output for both...instead am usng oscillator circuit(4 leg) rather than crystal(2 leg)..can u help me out..in it..
 

Hai,
Did you set the direction register (TRIS register)?
Try this also,
Code:
LATAbits.LATA0
 

Code:
# define PORTBIT(adr,bit)         ((unsigned)(&adr)*8+(bit))

static bit	YBzc    			@	PORTBIT(PORTB, 7);       // pin 40 of IC
static bit	rs  				@	PORTBIT(PORTC, 2);      // pin 15 of IC
static bit	en1 				@	PORTBIT(PORTC, 3);      // pin 16 of IC
static bit	en2 				@	PORTBIT(PORTB, 5);      // pin 38 of IC   
static bit	clk 				@	PORTBIT(PORTB, 1);      // pin 34 of IC
static bit	data 				@	PORTBIT(PORTB, 2);      // pin 35 of IC 
static bit	str 				@	PORTBIT(PORTB, 3);      // pin 36 of IC
static bit	oen 				@	PORTBIT(PORTC, 5);      // pin 24 of IC
Here is the sample of how to define port pins,I have done this for 18F4620 Hitech compiler for PIC 18
 

thanx a lot

- - - Updated - - -

thnx man...but i tried tat also...whre culd i find these infos..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top