View previous topic :: View next topic |
Author |
Message |
femto_raser
Joined: 07 Nov 2006 Posts: 2 Location: UK
|
16F690 Port B problem |
Posted: Tue Nov 07, 2006 2:14 am |
|
|
Hi,
I am using PCM CCS V3.222. I am writing code for the 16F690 but any commands relating to PORT B cause a compiler error along the lines of PORT B not being a valid PORT.
I have a #DEVICE 16F690 statement and have included the relevant .h
file.
Other ports are all working and compiling correctly.
Is there a known bug list for V3.222 ?
Thanks in advance
femto_raser |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Nov 07, 2006 2:57 am |
|
|
Quote: | I am using PCM CCS V3.222. I am writing code for the 16F690. |
Vs. 3.222 doesn't support the 16F690. It's not in the list of supported
devices for that verison. |
|
|
femto_raser
Joined: 07 Nov 2006 Posts: 2 Location: UK
|
16F690 |
Posted: Tue Nov 07, 2006 4:00 pm |
|
|
Hi - thanks PCM Programmer
actually my disc was version V3.222 but I am using V3.228 I must have downloaded the upgrade at some point.
When I run CCS +Q 16F690 does come up in the database of devices
so it should be supported ??
femto_raser |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Nov 07, 2006 4:26 pm |
|
|
It's supported in that vs. 3.228.
I don't think CCS lets you use the output_b() function because
in the 16F690, Port B is not a complete port. It only has pins B4-B7.
But I can compile all the code shown below with no errors:
Code: |
#include <16F690.h>
#fuses XT, NOWDT, NOPROTECT, PUT, BROWNOUT
#use delay(clock=4000000)
//=================================
void main()
{
int8 c;
output_low(PIN_B4);
output_high(PIN_B5);
output_float(PIN_B6);
c = input(PIN_B7);
set_tris_b(0xF0);
while(1);
} |
|
|
|
|