PIC18F44K22 RS232
Moderator: Benj
-
- Flowcode v5 User
- Posts: 104
- Joined: Fri Oct 10, 2014 11:15 am
- Has thanked: 27 times
- Been thanked: 22 times
- Contact:
PIC18F44K22 RS232
Good morning.
This simple program outputs RS232 on channel 1 (PortC,6) but not channel 2 (PortD,6).
I can output RS232 on PortD,6 using the software implementation.
Any ideas please?
Thanks,
Dave.
This simple program outputs RS232 on channel 1 (PortC,6) but not channel 2 (PortD,6).
I can output RS232 on PortD,6 using the software implementation.
Any ideas please?
Thanks,
Dave.
-
- Flowcode v5 User
- Posts: 104
- Joined: Fri Oct 10, 2014 11:15 am
- Has thanked: 27 times
- Been thanked: 22 times
- Contact:
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC18F44K22 RS232
Thanks.
That all looks OK.
Could you next try the attached CAL file, this is our latest, just in case you have older.
To go into your Flowcode 6 installation \CAL\PIC directory
That all looks OK.
Could you next try the attached CAL file, this is our latest, just in case you have older.
To go into your Flowcode 6 installation \CAL\PIC directory
- Attachments
-
- PIC_CAL_UART.c
- (23.32 KiB) Downloaded 185 times
-
- Flowcode v5 User
- Posts: 104
- Joined: Fri Oct 10, 2014 11:15 am
- Has thanked: 27 times
- Been thanked: 22 times
- Contact:
Re: PIC18F44K22 RS232
Still the same Leigh. On Channel 2 PortD,6 goes high but no data. Set to software on same pin all working.
Dave.
Dave.
-
- Flowcode v5 User
- Posts: 104
- Joined: Fri Oct 10, 2014 11:15 am
- Has thanked: 27 times
- Been thanked: 22 times
- Contact:
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC18F44K22 RS232
Hi Dave,
Sorry, this got pushed to one side, we'll source some hardware and look into it
Sorry, this got pushed to one side, we'll source some hardware and look into it
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC18F44K22 RS232
Hi Dave,
The quickest way to resolve this is to edit the PIC18f45k22.h header file (or whichever device you are using 44/45/46)
The file is found in your Flowcode6 installation directory \compilers\pic\boostc\include
Comment out the definition for TX2STA at around line 100
The quickest way to resolve this is to edit the PIC18f45k22.h header file (or whichever device you are using 44/45/46)
The file is found in your Flowcode6 installation directory \compilers\pic\boostc\include
Comment out the definition for TX2STA at around line 100
Code: Select all
// #define TX2STA 0x00000F72
-
- Flowcode v5 User
- Posts: 104
- Joined: Fri Oct 10, 2014 11:15 am
- Has thanked: 27 times
- Been thanked: 22 times
- Contact:
Re: PIC18F44K22 RS232
Hi Leigh,
I tried to do this but "do not have permission to modify this file"
I need to change it for the PIC18F45K22 and PIC18F44K22
Any ideas?
Thanks,
Dave.
I tried to do this but "do not have permission to modify this file"
I need to change it for the PIC18F45K22 and PIC18F44K22
Any ideas?
Thanks,
Dave.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC18F44K22 RS232
Hi Dave,
Ah right, that's a Windows thing, probably because they are under C:\Program Files (x86)
Maybe you can copy the files somewhere else, edit, then copy back?
Might get a Windows "Are you sure?" type dialogue.
Leigh
Ah right, that's a Windows thing, probably because they are under C:\Program Files (x86)
Maybe you can copy the files somewhere else, edit, then copy back?
Might get a Windows "Are you sure?" type dialogue.
Leigh
-
- Flowcode v5 User
- Posts: 104
- Joined: Fri Oct 10, 2014 11:15 am
- Has thanked: 27 times
- Been thanked: 22 times
- Contact:
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC18F44K22 RS232
So you removed TX2STA?
Just as a test you could edit Flowcode6\CAL\PIC\PIC_CAL_UART.c around line 319
Change
to
Although this is only for K22, it will break other builds.
Just as a test you could edit Flowcode6\CAL\PIC\PIC_CAL_UART.c around line 319
Change
Code: Select all
#ifdef TX2STA
Code: Select all
// #ifdef TX2STA
#if 0
-
- Flowcode v5 User
- Posts: 104
- Joined: Fri Oct 10, 2014 11:15 am
- Has thanked: 27 times
- Been thanked: 22 times
- Contact: