Author Topic: 8051 C language  (Read 8018 times)

BEAVIS

  • Guest
8051 C language
« on: June 12, 2006, 09:22:22 am »
Hi all
I have never used C language to program a 8051, I have a few questions sorry they migth sound stupid; how do you define an interrupt vector in C? For example to define a interrupt vector in assembly for UART I say "ORG 35H", how do you do that in C? is there any predefined method like "main" which we use for "ORG 00"?
Thank you

MikeR

  • Guest
Re: 8051 C language
« Reply #1 on: August 17, 2006, 06:52:49 am »
What are you using to compile the code? SDCC , Micro C?

I use SDCC and it tells you how in the Manual


void sw1_isr(void) interrupt 0; // /INT0 P3_2
void sw2_isr(void) interrupt 2; // /INT0 P3_3

I am sure that if you are usin Micro C it is also explained in the manual.

I am far from an expert just did a little reading

Mike

sci-3d

  • Guest
Re: 8051 C language
« Reply #2 on: August 21, 2006, 08:23:26 am »
Hi all

I also use SDCC and 8051 (P89V51RD2)

Please visit my 8051 homepage:
« Last Edit: December 01, 2006, 10:33:57 pm by sci-3d »