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.

help regarding C 8051

Status
Not open for further replies.

hamidraza22

Newbie level 6
Joined
Sep 21, 2006
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,362
hey i have two problems in doing ma fyp.
1. i m using 8051 controller with C language,. can any1 give me any specimen that how can i pass an array through a function.mean a function should be called with an array and in the function it gets sum value and then in the main program another function the same array have to b used.

2. interrupts in C. while using a single instruction in the "while" loop the external interrupt run as it has to.mean its alright with a single command but when i use 2 or more command then it just execute the interrupt on the right occasion n then it stucks until reset has to b pressed.how can i make it done.

thanku
 

hamidraza
1. u can pass an array to a function in c using pointers.
i.e
void func(int *ptr,int length)
{
for(i=0;i<length;i++)
ptr++;
}
main()
{
int a[4]={0,10,12,2};
func(a,4);
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top