newbe frustration

Status
Not open for further replies.
Russlk said:
Strange things still happen. It seem there is a BIG difference in assemblers. The same program written and assembled in Proton IDE LITE is nothing like the same program written and assembled in PICKBASIC PRO.

They aren't ASSEMBLERS, they are COMPILERS, the code they create is completely down to however wrote the compiler.
 
Russlk said:
Thanks for the correction, Nigel, so does the assembler create the .hex code?

It does from assembler code - with a high level compiler (such as BASIC or C) the compiler might create assembler code, then assemble it to a HEX file, or it may create the HEX file directly, it really depends on how the compiler was written.
 
Basic questions

Have you read the datasheet :?:

I don't know that PIC in particular but are you reasonably sure that the initialization is correct?

In my experience, my main problems, along these years, in order:

Uncomplete / incorrect initialization of the PIC (by far the more difficult to detect if taken for granted)

Wrong page handling

Wrong banking handling

Incorrect flow diagram

Before saying that a tool is not good check if you used whatever is consistent with it. Know the rules first. :!:
 
In my opinion, the high level language used to program should write correct assembly code. If I have to know assembly code, what is the point of the higher level language?
 
Russlk said:
In my opinion, the high level language used to program should write correct assembly code. If I have to know assembly code, what is the point of the higher level language?

The high level compiler presumably DOES write correct assembler code?, but because you have no knowledge of assembler you don't have sufficient knowledge of the hardware to write the high level code. The compiler is probably doing what you tell it, as opposed to what you want it to do.

Assembler forces you to understand the hardware, with a high level code you have to learn the hardware yourself. If you don't understand the hardware you're programming with a blindfold on, and wearing boxing gloves!.
 
Hopefully I’m not genuflecting, but I admire the discipline it takes to keep writing in assembly, although Nigel, you are probably at least, as fluid in assembly, as most people in a high level language.
Assembler forces you to understand the hardware, with a high level code you have to learn the hardware yourself.

Many of the troubles I have now are because I jumped into a compiler too soon. I keep thinking of going back to assembly, but it is so easy and quick to bang it out in C; the high level tools are a trap for beginners, I think.

Atferrari said:
Know the rules first. :!:
He then went on to list problems, all hardware related. My list is similar.

Ah, perhaps I'm talking myself into doing the right thing?

Nigel, I bet in your martial arts classes, weapon study is not allowed until a high degree of proficiency is achieved.

Regards,
Robert
 
BeeBop said:
Nigel, I bet in your martial arts classes, weapon study is not allowed until a high degree of proficiency is achieved.

True, and there are good reasons for it!, weapons don't appear on our syllabus until after Black Belt 1st Dan.

That's not to say that students, including juniors, don't get some experience of weapons training before that, but it's not actually part of the syllabus - and is usually a reward for good behaviour.
 
just wanted to chime in with something else here

in proton basic (picbasic) the high and low commands generate two assembler instructions, the first clears the approriate TRIS register (sets the pin as output) and the second sets or clears the output register

I've noticed using HIGH and LOW without some delay, will cause the pic to fail to set the proper output state

I usualy setup my tris registers ahead of time, with the tris instuction, and then use PORTx.0 = 0 or PORTx.0 = 1 to set or clear the output register, you can also use SET PORTx.0 and CLEAR PORTx.0 if that makes more sense
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…