|
|
View previous topic :: View next topic |
Author |
Message |
Flavio58
Joined: 08 Sep 2003 Posts: 21
|
A small suggestion for CCS manual .... |
Posted: Mon Aug 04, 2003 4:39 am |
|
|
<font face="Courier New" size=-1>Since in Micropchip PICxx datasheets all functions are explained using the registers...why in the CCS manual, near the compiler functions, you don't write the concerned register setting ?
This is because if you don't known the pic usage as first step you see the datasheet.
As example, about my last problem with pic oscillator, in PIC18F452 datasheet I saw that to activate the quartz oscillator on timer1 I must set the T1CON register.
In CCS manual about timer1 I saw setup_timer_1() funtion but now I don't' known if I this function set correctly this register of if I must to use the register setting using #bit or #byte directive .....
Another example ?
In CCS manual I saw the set_timer1() function...
This function do the same of setting the TMR1 register ?</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516645 |
|
|
R.J.Hamlett Guest
|
Re: A small suggestion for CCS manual .... |
Posted: Mon Aug 04, 2003 5:47 am |
|
|
:=<font face="Courier New" size=-1>Since in Micropchip PICxx datasheets all functions are explained using the registers...why in the CCS manual, near the compiler functions, you don't write the concerned register setting ?
:=This is because if you don't known the pic usage as first step you see the datasheet.
:=As example, about my last problem with pic oscillator, in PIC18F452 datasheet I saw that to activate the quartz oscillator on timer1 I must set the T1CON register.
:=In CCS manual about timer1 I saw setup_timer_1() funtion but now I don't' known if I this function set correctly this register of if I must to use the register setting using #bit or #byte directive .....
:=Another example ?
:=In CCS manual I saw the set_timer1() function...
:=This function do the same of setting the TMR1 register ?</font>
Ask CCS...
This board, _is not_ CCS. It is a group of users, who post to help individuals (and sometimes to hinder them... :-).
Improvements to the manual, are a common 'theme' here (most of use have at one time or another, pointed out that the manual is not really 'up to the job).
Any questions that are 'to CCS', should be sent directly to them, rather than posted here.
Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516647 |
|
|
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
Re: A small suggestion for CCS manual .... |
Posted: Mon Aug 04, 2003 6:37 am |
|
|
:=<font face="Courier New" size=-1>Since in Micropchip PICxx datasheets all functions are explained using the registers...why in the CCS manual, near the compiler functions, you don't write the concerned register setting ?
:=This is because if you don't known the pic usage as first step you see the datasheet.
:=As example, about my last problem with pic oscillator, in PIC18F452 datasheet I saw that to activate the quartz oscillator on timer1 I must set the T1CON register.
:=In CCS manual about timer1 I saw setup_timer_1() funtion but now I don't' known if I this function set correctly this register of if I must to use the register setting using #bit or #byte directive .....
:=Another example ?
:=In CCS manual I saw the set_timer1() function...
:=This function do the same of setting the TMR1 register ?</font>
The C code hides the underlying machine instructions. This is good but in order to better understand what is going on you might choose to learn to look at the assembly code in the .lst file produced by the compiler. CCS interleaves the c code line and below shows the assembly instructions that implement that line. In its symbolic form the lst file will name the registers and variables it uses rather than their aboslute physical locations. I learned a few years back from this board that it often was possible to answer 99\% of the questions I had by this approach. For the 1\% that were left I am still gratefull that PCM programmer could answer them. Good news is that there are a limited number of assembly instructions so the learning curve can be short for most people.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516649 |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
Re: A small suggestion for CCS manual .... |
Posted: Mon Aug 04, 2003 8:41 am |
|
|
That is the very reason why I don't use the "built in" functions. If CCS provided the source code so that I could see it, I might be more inclined to use it. You shouldn't have to look at the assembly to know what is going on.
:=<font face="Courier New" size=-1>Since in Micropchip PICxx datasheets all functions are explained using the registers...why in the CCS manual, near the compiler functions, you don't write the concerned register setting ?
:=This is because if you don't known the pic usage as first step you see the datasheet.
:=As example, about my last problem with pic oscillator, in PIC18F452 datasheet I saw that to activate the quartz oscillator on timer1 I must set the T1CON register.
:=In CCS manual about timer1 I saw setup_timer_1() funtion but now I don't' known if I this function set correctly this register of if I must to use the register setting using #bit or #byte directive .....
:=Another example ?
:=In CCS manual I saw the set_timer1() function...
:=This function do the same of setting the TMR1 register ?</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516654 |
|
|
Sherpa Doug Guest
|
Re: A small suggestion for CCS manual .... |
Posted: Mon Aug 04, 2003 11:00 am |
|
|
:=That is the very reason why I don't use the "built in" functions. If CCS provided the source code so that I could see it, I might be more inclined to use it. You shouldn't have to look at the assembly to know what is going on.
:=
But the listing does give you the source code, unless there is a "real" source written in C which I doubt. I would assume the functions are just assembly macros.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516656 |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
Re: A small suggestion for CCS manual .... |
Posted: Mon Aug 04, 2003 11:50 am |
|
|
You mean like this
#define make_16bit(data,var1,var2) {_asm \
MOVFF &var1, (&data+1) \
MOVFF &var2, &data \
_endasm}
They can still show it in a file. I shouldn't have to parse a lst file for it. And if it is wrong, then you can fix it! How many times has these "macros" been incorrect? Quite a few if I remember correctly.
:=:=That is the very reason why I don't use the "built in" functions. If CCS provided the source code so that I could see it, I might be more inclined to use it. You shouldn't have to look at the assembly to know what is going on.
:=:=
:=
:=But the listing does give you the source code, unless there is a "real" source written in C which I doubt. I would assume the functions are just assembly macros.
:=
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516658 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|