chetan.rmit@gmail.com
New Member
Hi building a trigger circuit, so I'am required to generate continuous on-off pulse from the Microcontroller. I' am using Internal clock through the following instruction :
__CONFIG(MCLRDIS & WDTDIS & UNPROTECT & INTRC);
Then I tried to configure Timer0.
So I did the following.
T0CS = 0 //Transition on internal instruction cycle clock, FOSC/4
PSA = 0 // Prescaler assigned to Timer0
PS0=1;PS1=1;PS2=1 // For maximum prescaler of 1:256
( Used the above, from the header file pic125xx.h as:
/* OPTION bits */
#define GPWU (1<<7)
#define GPPU (1<<6)
#define T0CS (1<<5)
#define T0SE (1<<4)
#define PSA (1<<3)
#define PS2 (1<<2)
#define PS1 (1<<1)
#define PS0 (1<<0)
)
But the compiler threw up an error , as :
Error [202] C:\Users\Chetan\Desktop\Yogesh\pulse.c; 10.11 only lvalues may be assigned to or modified
Couldn't understand where I went wrong. I' am new to Hi-tech compiler and trying to get used to it. Any kind of help will be greatly appreciated and would be of lot of help.
Thanks
Regards
Chetan Gowda
__CONFIG(MCLRDIS & WDTDIS & UNPROTECT & INTRC);
Then I tried to configure Timer0.
So I did the following.
T0CS = 0 //Transition on internal instruction cycle clock, FOSC/4
PSA = 0 // Prescaler assigned to Timer0
PS0=1;PS1=1;PS2=1 // For maximum prescaler of 1:256
( Used the above, from the header file pic125xx.h as:
/* OPTION bits */
#define GPWU (1<<7)
#define GPPU (1<<6)
#define T0CS (1<<5)
#define T0SE (1<<4)
#define PSA (1<<3)
#define PS2 (1<<2)
#define PS1 (1<<1)
#define PS0 (1<<0)
)
But the compiler threw up an error , as :
Error [202] C:\Users\Chetan\Desktop\Yogesh\pulse.c; 10.11 only lvalues may be assigned to or modified
Couldn't understand where I went wrong. I' am new to Hi-tech compiler and trying to get used to it. Any kind of help will be greatly appreciated and would be of lot of help.
Thanks
Regards
Chetan Gowda