writing efficient code PIC microcontrollers

Status
Not open for further replies.

jpanhalt

Joined Jan 18, 2008
11,087
So, just to be clear, you submitted a "challenge" with no intent to actually follow through.

You have a smartphone, computer, and writing implements, so you do have the ability to follow through.

I agree with MMcLaren's conclusion (post #56).

John
 
So, just to be clear, you submitted a "challenge" with no intent to actually follow through.

You have a smartphone, computer, and writing implements, so you do have the ability to follow through.

I agree with MMcLaren's conclusion (post #56).

John
Well, North (the poster of the assembly code) -- called my argument.
He stated that the C compiler outputs the same assembly code for general syntax.

This was my argument. To support it I would need enthusiasm, time and self-motivation.
Which I don't have.
 

ErnieM

Joined Apr 24, 2011
8,377
Well, North (the poster of the assembly code) -- called my argument.
He stated that the C compiler outputs the same assembly code for general syntax.

This was my argument. To support it I would need enthusiasm, time and self-motivation.
Which I don't have.
Here we see absolute and complete proof of the premise of post #56.

Troll. Final answer.

(Aside: stop feeding the troll.)
 
how does that relate to OPs question?
Oh I can talk straight up and down 'robotic' too.

The OP is learning plenty ...

For starters he is learning that there is no need for assembly language since the C compiler outputs basically the same that an fluent assembly programmer would write.

But there are exceptions where an highly skilled programmer cpuld better the compiler.
 

takao21203

Joined Apr 28, 2012
3,702
Oh I can talk straight up and down 'robotic' too.

The OP is learning plenty ...

For starters he is learning that there is no need for assembly language since the C compiler outputs basically the same that an fluent assembly programmer would write.

But there are exceptions where an highly skilled programmer cpuld better the compiler.
I have quoted OPs post and wrote two excerpts.

He did not ask about assembler. He wrote he's using Micro C, and asks about techniques to write efficient code.
 
I have quoted OPs post and wrote two excerpts.

He did not ask about assembler. He wrote he's using Micro C, and asks about techniques to write efficient code.
Yeah well that comes with years of experience. Passion and dedication.

I cannot help the OP to write an Pacman video game in one para of text.

It takes years to get good with it.
 

takao21203

Joined Apr 28, 2012
3,702
Yeah well that comes with years of experience. Passion and dedication.

I cannot help the OP to write an Pacman video game in one para of text.

It takes years to get good with it.
How about answering OPs question: How to write efficient code, assumed using mikro C. Anything else is trolling.
 
How about answering OPs question: How to write efficient code, assumed using mikro C. Anything else is trolling.
O.K

a. Think in tiny steps. Break the problem down into as many pieces as possible.
b. Hardcode data where possible. Avoid having to compute maths.
c. Avoid repeated code. If this if that (would one IF condition in an loop work?)
d. Assign yourself projects / goals. Keep at it until you win.
e. The use of the 'switch' statement in C is an excellent way to structure your algorithms.
 

takao21203

Joined Apr 28, 2012
3,702
O.K

a. Think in tiny steps. Break the problem down into as many pieces as possible.
b. Hardcode data where possible. Avoid having to compute maths.
c. Avoid repeated code. If this if that (would one IF condition in an loop work?)
d. Assign yourself projects / goals. Keep at it until you win.
e. The use of the 'switch' statement in C is an excellent way to structure your algorithms.
I doubt this is much useful and I doubt this is based on profound experience.
 
I doubt this is much useful and I doubt this is based on profound experience.
Well, code just happens. You either can or cannot write algorithms.

I have 5-years solid experience with writing software.

I started off with the right idea but quite a poor programmer.

Today I can write stuff that is only half laughable.

I did npt understand C until I formally studied Java.

I just passed an unit called Discrete Maths. The bollean algebra is the only reason I passed.

Go and do some Java units online. They're only $600 and well worth the money.
 

WBahn

Joined Mar 31, 2012
30,075
You are practicing the art of necroposting, which is reviving a long dead thread. The TS has almost certainly either received a satisfactory answer or is no longer interested. Please look at the dates of the post you are replying to when deciding to reply (but don't feel too bad, it's something most of us have done more than once).

If you feel further discussion is appropriate, please start a new thread (that will be all yours).
 
Status
Not open for further replies.
Top