Raady Here
Full Member level 5
- Joined
- Jun 8, 2013
- Messages
- 242
- Helped
- 26
- Reputation
- 52
- Reaction score
- 26
- Trophy points
- 28
- Location
- India
- Activity points
- 1,571
MPLAB8.8V/PIC30F5011
Hi,
Normally MCLR pin enable/ disable is done when it is programmed, but I have a requirement to enable/disable at certain points of code execution.
What is the way to do it ?
My Error Log :
Regards,
Raady.
Hi,
Normally MCLR pin enable/ disable is done when it is programmed, but I have a requirement to enable/disable at certain points of code execution.
What is the way to do it ?
Code:
void Switch_ON_Motor(void)
{
_FBORPOR(MCLR_DIS); // Disable reset pin
Latch_1 = Enable; // Enable Latch
Relay_1 = High; // R Phase
Relay_2 = High; // Y Phase
Relay_3 = High; // B Phase
TimerDelay_10ms(1);
Latch_1 = Disable; // Disable Latch
// printf("\n\rSwitch ON Motor");
}
Code:
main.c: In function 'Switch_OFF_Motor':
main.c:298: error: section attribute cannot be specified for local variables
main.c:298: warning: ignoring space attribute applied to automatic _FBORPOR
main.c:298: warning: unused variable '_FBORPOR'
main.c: In function 'Switch_ON_Motor':
main.c:610: error: section attribute cannot be specified for local variables
main.c:610: warning: ignoring space attribute applied to automatic _FBORPOR
main.c:610: warning: unused variable '_FBORPOR'
Regards,
Raady.