I think I am using TRIS incorrectly. Can Someone give me the correct format for miKroC 32 bit PIC32MX795F510L?
TRISAbits.TRISA1 = 1;
errors:
13 402 ; expected, but '.' found GM 5-23-2016.c
13 393 'TRISAbits' Identifier redefined GM 5-23-2016.c
13 371 Specifier needed GM 5-23-2016.c
13 396 Invalid declarator expected'(' or identifier GM 5-23-2016.c
TRIS settings
-
- Posts: 1558
- Joined: 24 Jun 2007 19:27
- Location: 01800 St Maurice de Gourdans France
- Contact:
Re: TRIS settings
hello,
for 18F PIC ( 8 bits MCU)
we can use this syntax
TRISA.F1=1;
TRISA.B1=1;
TRISA1_bit=1;
with :
TRISAbits.TRISA1 = 1;
i don't get any error in compiling ...
maybe your problem is elsewhere..
i don't know if syntax is the same for PIC32 !
for 18F PIC ( 8 bits MCU)
we can use this syntax
TRISA.F1=1;
TRISA.B1=1;
TRISA1_bit=1;
with :
TRISAbits.TRISA1 = 1;
i don't get any error in compiling ...
maybe your problem is elsewhere..
i don't know if syntax is the same for PIC32 !
Re: TRIS settings
Hi Your syntax is correct that is also the standard way for the MCHP compiler syntax I would advise you to
make bug report at mE help desk
as a work around use the mE style
TRISA1_bit that compiles correctly as you can see from my screen print
make bug report at mE help desk
as a work around use the mE style
TRISA1_bit that compiles correctly as you can see from my screen print
- Attachments
-
- 23.05.jpg (161.13 KiB) Viewed 3017 times
P.Erasmus
Saratov,Russia
--------------------------------------------------------------
Saratov,Russia
--------------------------------------------------------------
Re: TRIS settings
Thanks for the help. I will double check my work.
Sid
Sid
- uros.cvetinovic
- mikroElektronika team
- Posts: 803
- Joined: 14 Dec 2015 09:24
Re: TRIS settings
Hi,
Can you please zip and send your project where you are using this line:
TRISAbits.TRISA1 = 1;
I tried it in our compiler, and it gives no error when compiling for PIC32MX795F512L.
Best regards,
Uros
Can you please zip and send your project where you are using this line:
TRISAbits.TRISA1 = 1;
I tried it in our compiler, and it gives no error when compiling for PIC32MX795F512L.
Best regards,
Uros
Re: TRIS settings
GOT RID OF JTAGEN AND PROBLEM WENT AWAY.
JTAGEN = 0;
Thanks,
Sid
JTAGEN = 0;
Thanks,
Sid