Object inspector

The objects inspector is the main tool for setting up and change character of what you can achieve with a macro. This is a simple process that allows you to configure things like port:s, bit numbers and different options you can use in a macro. If we have a macro like Delay1mS at 1MHz, there is nothing actually to setup. This macro will give rise to a 1mS delay no matter what the circumstances. If you use a set macro like this in let's say a 4MHz environment you will only get 250uS delay since the frequency is 4 times higher.
But normally you have more you can do with a macro,

Here you can see that the main body of functions, different ports with different values and functions
In this example we have a set of possible setup:s for the object on the picture, what you can see is that both the PORT assignment and also an example of Bit assignment and how that looks. In the case of the PORT this particular MCU can handle 4 PORT:s as you can see. PORTA, B, C and D. If you look at how a chip is organised you will understand exactly what this names means. When you design a circuit, you have to connect the Micro controller some ware so that it can do the different types of work you want to do.
Normally a LCD or a memory of some kind have a DATA bus of some kind. It can be a complete port 8 bit's OR it can be just a few bit's of a port. In this case you tell the system what port you connected the signals from your application to and then the true bit number. After this the system has all information that actually is needed to handle your connection / application. There are a lot of things that can be connected to a MCU but they basically follow the same rule all of them. The knowledge to actually get any function out of what has been connected is up to the macros and the creators of them.
You can here set the following data assumed that we work at 1MHz right now ( 1 million Inst / second) :
We can set the macro to OFF then Timer0 will be switched OFF
We can set the macro to CK that means that 1 MHz will be injected into the pre scaler.
A pre scaler is a counter that counts a number of clock pulses before the internal actual register we are using is affected.
So if we inject 1MHz onto the Timer0 it will count up with a frequency of 1 million counts a second. But be aware, the TMR0 register can only count 256 pulses and on the 256:th puls it will be ZERO=0 again.
Next we can use DIV_by_8 means that first the pre scaler counts 8 pulses and on the 8 puls TMR0 register will count 1 then 8 more pulses through the pre scaler and then TMR0 count 1 and reach 2. so this is a way to slow down the 1MHz to 125 kHz.
Let's look at the maximum pre scaler functionality DIV_BY_1024, we start at 1MHz ( system speed ) pre scaler counts 1024 pulses before TMR0 counts 1 that makes the TMR0 to be exposed to a frequency of 976.56 Hz i.e. 976.56 pulses (/ second from 1 million. In this fashion we can re shape the main frequency to something we easier can use as a timer depending on the type of mission the MCU is suppose to perform.
Look at the table and you see more alternatives for dividing the frequency with ease... we will show more how to use this in your practical code later in the examples section.
The objects inspector have been kept very simple to keep away a lot of the knowledge that you usually need to use one. In the ordinary work flow of a objects inspector you normally need to know and understand what you affect and how this will affect the code in it's operation. What we do in RCG is instead to give you several clearly stated functions to choose from.