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 me with HI-TECH c programmer .. how to.

Status
Not open for further replies.

nemo4all

Junior Member level 1
Joined
Mar 12, 2010
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Kolkata
Activity points
1,379
I am new to PIC programming.. I am familiar with AVR compilers and programming..

Please help me how to start writing a code in HI-TECH compiler for a PIC.. for eg. PIC16F84
 

PIC10/12/16 MCUs
PIC18 MCUs
All compilers are available individually and also in the HI-TECH C® Enterprise Edition suite.

Omnsicient Code Generation™

Omniscient Code Generation (OCG) has been developed to read and process all C source modules in one step.

Rather than relying completely on the linker to uncover errors in independently compiled modules, an OCG compiler completes the initial stages of compilation for each module separately, but defers object code generation until the point at which a view of the whole program is available.

Information gathered from a global view of the program, can be used to provide better detection of potential errors in the user’s code, and to better optimize the output.

HI-TECH C compilers can deliver denser code, improve RAM utilization and reduce interrupt latency.


Save Time

Faster Interrupts. Since HI-TECH C compilers know exactly which registers will be used for any interrupt, they can determine the context size dynamically, based on the state of the program at the time of compilation. Code generated by OCG compilers may not need to save any registers during an interrupt routine, thereby saving cycles that are wasted by non-OCG compilers. Fewer instruction cycles means the MCU can spend more time in sleep mode.




Denser Code, Better Performance

Unused Variables. The all-seeing nature of OCG enables the compiler to determine if a variable is being used in the program. Unused variables are removed, thus saving RAM.

Auto Variables. If two functions are never active at the same time, their auto variables can be overlapped. The function call graph that OCG constructs means that the exact usage of the functions is known and this technique can be effectively applied.

Registers. The compiler will also know exactly which registers are in both interrupt and mainline context, so it can generate code accordingly, minimizing both the code size and cycles required to switch contexts.

Automatic Bank Management. OCG allows automatic allocation of data into RAM banks eliminating the need for the programmer to specify the location of the variables.

Customized printf. OCG has the ability to generate a printf function that is customized for the program at hand. It does this by scanning the user’s code and only includes those features of printf that were detected. This results in a huge saving in program memory but also saves you valuable RAM space.






Focus more on your goals and less on your code

Operation. Most embedded C compilers require special linker scripts and numerous command line options to be used to cater for differing device architectures. With full knowledge of the device and the ability to determine where all objects will be linked, much of this work is reduced or eliminated with HI-TECH C compilers.

Eliminates the Need for Memory Space Qualifiers. Because the compiler knows how frequently each variable is used and which variables are dependent, it can optimize pointers and position objects in the most efficient memory spaces, eliminating the need for the programmer to do this manually with non-standard C language extensions.





Debugging with Optimizations. Since a lot more of the optimizations are performed at the C level, rather than at the assembly or linker level, HI-TECH C PRO compilers allows more comprehensive debugging of code, even with the optimizations turned on. As a rule, code compiled with full optimization can be difficult or impossible to debug, making it very difficult to identify bugs that may be causing the system to function incorrectly. The OCG compiler automatically preserves all the relationships between the object code and the original C-code, enabling the quick and simple debugging of optimized code. Even C library code in your project can be debugged at the source level.
 
Migrate to MPLAB XC.

I have no knowledge about PIC environments.. I have downloaded MPLAB..
Now as you have said to use MPLAB xc, I visited the microchip forum and found MPLAB XC8, MPLAB XC32, MPLAB XC16.. Which one to use and which one will me more easier for me to learn..
 


I was going through the page you referred to ..

But I found that the MPLAB XC8 does not support C++ language..
I need to program a PIC 10F202.

Untitledpic.png
 

I was going through the page you referred to ..

But I found that the MPLAB XC8 does not support C++ language..
I need to program a PIC 10F202.

View attachment 88231

You can try to convince Microchip to make support for this in XC8 and to give free license.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top