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.

Tutorials on programming in micro C

Status
Not open for further replies.

ajeesh

Member level 3
Joined
Mar 19, 2009
Messages
65
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
india
Activity points
1,674
why not changing portb value portc changes

void main()
{
PORTC = 0;
TRISC = 0;
PORTB = 0;
TRISB = 0;
DD:
PORTB = 0X01;
PORTC = ~PORTC;
Delay_ms(1000);
PORTB = 0X02;
goto DD ;

}
 

Re: delay prob

could you please mention

Microntrller name?

Compiler used?



Also what I could comprehend is that the PORTB values are changing but PORTC do not, is it correct?
 
  • Like
Reactions: siktec

    siktec

    Points: 2
    Helpful Answer Positive Rating
Re: delay prob

16f877a

mikroC compiler
 

Re: delay prob

It depends on your application.
You are free to do what you want based on your requirement.
--
Amr Ali
 

Re: delay prob

any good tutorial link for mikroC
 

Re: delay prob

but i need some example codes that helpful for beginners
 

Re: delay prob

The manual explains the libraries. at the end of each library there is a real example for the library usage.
 

Re: delay prob

what are the advantages of using mikroC instead of assembly language
i feel assembly language is easy , that i know some examples in mikroc compiler if except this one advantage what are more advantage using mikroc
 

Re: delay prob

A high level programming is more handy than using assembly code!!!!
Faster development time
More reusable code
More Trusted code
You can list more
 

Re: delay prob

which is the best compiler for pic mplab HI-TECH C or mikroC
 

Re: delay prob

In my opinion MikroC
 

Re: delay prob

i also want to work with rtos microc os ii . which is low cost micro controller which can run microc os ii
 

Re: delay prob

i just check it but there is not telling about which micro controllers are suitable for it
 

Re: delay prob

Hi ajeesh,

Did you find the solution? Use the code below:



void main()
{
PORTC = 0;
TRISC = 0;
PORTB = 0;
TRISB = 0;

DD:

PORTB = 0X01; //but immediately changes to old value here, so you won't feel it.
PORTC = ~PORTC;
Delay_ms(1000);
PORTB = 0X02; //PORTB changes value here, (read previous comment)

goto DD ;

}


Modify the code to:


void main()
{
PORTC = 0;
TRISC = 0;
PORTB = 0;
TRISB = 0;

DD:

PORTB = 0X01;
PORTC = ~PORTC;
Delay_ms(1000);
PORTB = 0X02;
Delay_ms(1000); //Delay, so that you can view the change in
//PORTB
goto DD ;

}
 

Re: delay prob

In module 11, it states which controllers can run ucos-ii. In addition, micrium website has ready made ports for the famous processors it supports.
--
Amr
 

delay prob

Thanks mat it is working
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top