View previous topic :: View next topic |
Author |
Message |
Begin
Joined: 11 Nov 2004 Posts: 2
|
Compiler 3.191 ( Wizard problem ) |
Posted: Thu Nov 11, 2004 4:57 am |
|
|
Hi,
I have updated my compiler by 3.191 version ( from 3.184 )
IDE 3.143
PCB,PCW,PCH 3.191
Windows XP Professional V.2002 S.P. 2
I can't configure my PIC16C781 for A/D module, because the
window is Blank ! The window has only two combobox to configure
Option button for A/D channel not exist
The PIC16c781 has 8 A/D channel
Can you help me?
Thank
G. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Nov 11, 2004 2:27 pm |
|
|
I think they removed support for the A/D converter for the 16c781
in PCM vs. 3.191. You'll either have to upgrade the compiler or
setup the A/D configuration manually, with code.
For your information, here's the ASM code produced by version 3.212.
I haven't checked it, but assuming it's correct, you could use it as a
guide for writing your own A/D functions.
Code: | 0000 00228 .................... void main()
0000 00229 .................... {
0019 0184 00230 CLRF 04
001A 301F 00231 MOVLW 1F
001B 0583 00232 ANDWF 03,F
001C 1683 00233 BSF 03.5
001D 121F 00234 BCF 1F.4
001E 129F 00235 BCF 1F.5
001F 3000 00236 MOVLW 00
0020 009D 00237 MOVWF 1D
0021 3007 00238 MOVLW 07
0022 1283 00239 BCF 03.5
0023 009F 00240 MOVWF 1F
0000 00241 .................... char c;
0000 00242 ....................
0000 00243 .................... setup_port_a(sAN0);
0024 1683 00244 BSF 03.5
0025 121F 00245 BCF 1F.4
0026 129F 00246 BCF 1F.5
0027 3000 00247 MOVLW 00
0028 3801 00248 IORLW 01
0029 009D 00249 MOVWF 1D
0000 00250 .................... setup_adc(ADC_CLOCK_INTERNAL);
002A 1283 00251 BCF 03.5
002B 171F 00252 BSF 1F.6
002C 179F 00253 BSF 1F.7
002D 141F 00254 BSF 1F.0
0000 00255 .................... set_adc_channel(0);
002E 3000 00256 MOVLW 00
002F 00A1 00257 MOVWF 21
0030 081F 00258 MOVF 1F,W
0031 39C5 00259 ANDLW C5
0032 0421 00260 IORWF 21,W
0033 009F 00261 MOVWF 1F
0000 00262 ....................
0000 00263 .................... while(1)
0000 00264 .................... {
0000 00265 .................... c = read_adc();
0034 151F 00266 BSF 1F.2
0035 191F 00267 BTFSC 1F.2
0036 2835 00268 GOTO 035
0037 081E 00269 MOVF 1E,W
0038 00A3 00270 MOVWF 23 |
|
|
|
Begin
Joined: 11 Nov 2004 Posts: 2
|
|
Posted: Fri Nov 12, 2004 7:34 am |
|
|
Thanks, but I have downloaded 3.212 version.
On-line there are two version 3.191 and 3.212, why? |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Fri Nov 12, 2004 3:58 pm |
|
|
3.191 is the 'stable' version, while 3.212 is the latest (and beta) version. which may contain bugs. |
|
|
|