打印

PIC16系列是不是都有4个bank的??

[复制链接]
3741|5
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
wdliming|  楼主 | 2012-12-17 11:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
AN, pic16, IO, ce, TI
本帖最后由 wdliming 于 2012-12-17 11:49 编辑

如题,我的开发环境是maplab+picc9.5的,吧芯片选为PIC16F877A情况下,是有4个bank的,如下:Clean: Deleting intermediary and output files.
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.obj".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.cce".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.obj".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.cce".
Clean: Deleted file "BIC3.cof".
Clean: Done.
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -C -E"10w_ pump.cce" "10w_ pump.c" -O"10w_ pump.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F877A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 39 : non-prototyped function declaration for "inital"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 61 : non-prototyped function declaration for "delay30us"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 70 : non-prototyped function declaration for "delay1ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 79 : non-prototyped function declaration for "delay400us"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 88 : non-prototyped function declaration for "delay50ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 97 : non-prototyped function declaration for "delay500ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 109 : non-prototyped function declaration for "delay1s"
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 631 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 639 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 646 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 698 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 707 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 714 : implicit conversion of float to integer
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 779 : non-prototyped function declaration for ""
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -C -E"usart.cce" "usart.c" -O"usart.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F877A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -E"BIC3.lde" "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.obj" "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.obj" -M"BIC3.map" -O"BIC3.cof" -O"BIC3.hex" -Q -MPLAB -16F877A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details

Memory Usage Map:

Program space:
    CODE                 used   A88h (  2696) of  2000h words   ( 32.9%)
    CONST                used     0h (     0) of  2000h words   (  0.0%)
    ENTRY                used    16h (    22) of  2000h words   (  0.3%)
    STRING               used     0h (     0) of  2000h words   (  0.0%)

Data space:
    BANK0                used    35h (    53) of    60h bytes   ( 55.2%)
    BANK1                used    1Eh (    30) of    50h bytes   ( 37.5%)
    BANK2                used     0h (     0) of    60h bytes   (  0.0%)
    BANK3                used     0h (     0) of    60h bytes   (  0.0%)
    COMBANK              used     1h (     1) of    10h bytes   (  6.3%)

EEPROM space:
    EEDATA               used     0h (     0) of   100h bytes   (  0.0%)

ID Location space:
    IDLOC                used     0h (     0) of     4h bytes   (  0.0%)

Configuration bits:
    CONFIG               used     0h (     0) of     1h word    (  0.0%)

Summary:
    Program space        used   A9Eh (  2718) of  2000h words   ( 33.2%)
    Data space           used    54h (    84) of   170h bytes   ( 22.8%)
    EEPROM space         used     0h (     0) of   100h bytes   (  0.0%)
    ID Location space    used     0h (     0) of     4h bytes   (  0.0%)
    Configuration bits   used     0h (     0) of     1h word    (  0.0%)

Loaded E:\company\10W_PUMP_CTRL\PIC\SourceCode\BIC3.cof.
BUILD SUCCEEDED: Mon Dec 17 11:40:19 2012


但是我把芯片选为873A的,编译结果是:
Clean: Deleting intermediary and output files.
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.obj".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.cce".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.obj".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.cce".
Clean: Deleted file "BIC3.cof".
Clean: Done.
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -C -E"10w_ pump.cce" "10w_ pump.c" -O"10w_ pump.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F873A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 39 : non-prototyped function declaration for "inital"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 61 : non-prototyped function declaration for "delay30us"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 70 : non-prototyped function declaration for "delay1ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 79 : non-prototyped function declaration for "delay400us"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 88 : non-prototyped function declaration for "delay50ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 97 : non-prototyped function declaration for "delay500ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 109 : non-prototyped function declaration for "delay1s"
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 631 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 639 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 646 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 698 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 707 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 714 : implicit conversion of float to integer
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 779 : non-prototyped function declaration for ""
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -C -E"usart.cce" "usart.c" -O"usart.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F873A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -E"BIC3.lde" "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.obj" "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.obj" -M"BIC3.map" -O"BIC3.cof" -O"BIC3.hex" -Q -MPLAB -16F873A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details

Memory Usage Map:

Program space:
    CODE                 used   AB4h (  2740) of  1000h words   ( 66.9%)
    CONST                used     0h (     0) of  1000h words   (  0.0%)
    ENTRY                used    16h (    22) of  1000h words   (  0.5%)
    STRING               used     0h (     0) of  1000h words   (  0.0%)

Data space:
    BANK0                used    36h (    54) of    60h bytes   ( 56.3%)
    BANK1                used    1Fh (    31) of    60h bytes   ( 32.3%)

EEPROM space:
    EEDATA               used     0h (     0) of    80h bytes   (  0.0%)

ID Location space:
    IDLOC                used     0h (     0) of     4h bytes   (  0.0%)

Configuration bits:
    CONFIG               used     0h (     0) of     1h word    (  0.0%)

Extra space:
    BANK3                used     1h (     1) of     1h unit    (100.0%)
    BANK2                used     1h (     1) of     1h unit    (100.0%)

Summary:
    Program space        used   ACAh (  2762) of  1000h words   ( 67.4%)
    Data space           used    55h (    85) of    C0h bytes   ( 44.3%)
    EEPROM space         used     0h (     0) of    80h bytes   (  0.0%)
    ID Location space    used     0h (     0) of     4h bytes   (  0.0%)
    Configuration bits   used     0h (     0) of     1h word    (  0.0%)
                         used     2h (     2) of     1h unit    (200.0%)

Loaded E:\company\10W_PUMP_CTRL\PIC\SourceCode\BIC3.cof.
BUILD SUCCEEDED: Mon Dec 17 11:41:13 2012

下面的图是我从datasheet上拿过来 的。



bank.JPG (166.76 KB )

bank.JPG
沙发
wdliming|  楼主 | 2012-12-17 11:48 | 只看该作者
本帖最后由 wdliming 于 2012-12-17 11:49 编辑

很明显有不同的,我在全局变量里把部分变量定义在bank2里,
bank2 unsigned int STACK_P,STACK_PO,pressure=0;
873A就编译不通过:
Clean: Deleting intermediary and output files.
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.obj".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.cce".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.obj".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.cce".
Clean: Deleted file "BIC3.cof".
Clean: Done.
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -C -E"10w_ pump.cce" "10w_ pump.c" -O"10w_ pump.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F873A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 39 : non-prototyped function declaration for "inital"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 61 : non-prototyped function declaration for "delay30us"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 70 : non-prototyped function declaration for "delay1ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 79 : non-prototyped function declaration for "delay400us"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 88 : non-prototyped function declaration for "delay50ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 97 : non-prototyped function declaration for "delay500ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 109 : non-prototyped function declaration for "delay1s"
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 631 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 639 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 646 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 698 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 707 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 714 : implicit conversion of float to integer
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 779 : non-prototyped function declaration for ""
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -C -E"usart.cce" "usart.c" -O"usart.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F873A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -E"BIC3.lde" "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.obj" "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.obj" -M"BIC3.map" -O"BIC3.cof" -O"BIC3.hex" -Q -MPLAB -16F873A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details
Error[477]   : fixup overflow in expression (location 0x14BA (0x144C+110), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x14C2 (0x14BE+4), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x14DE (0x14BE+32), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x14E6 (0x14BE+40), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x150A (0x14F4+22), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x1516 (0x14F4+34), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x1566 (0x1538+46), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x1572 (0x1538+58), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x16AC (0x166C+64), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x16B4 (0x16B4+0), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x16C0 (0x16B4+12), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x16D0 (0x16B4+28), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x16E0 (0x16B4+44), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x16EA (0x16B4+54), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x16FA (0x16B4+70), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x170C (0x170C+0), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x1718 (0x170C+12), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x1752 (0x170C+70), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x175A (0x170C+78), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x17DE (0x17AE+48), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x17E6 (0x17AE+56), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x186C (0x1850+28), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x1874 (0x1850+36), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x1944 (0x18F0+84), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x194C (0x194C+0), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x19D2 (0x1996+60), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x19DA (0x1996+68), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x1A60 (0x1A34+44), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x1A68 (0x1A34+52), size 1, value 0x1BC)
Error[477]   : fixup overflow in expression (location 0x1B36 (0x1B30+6), size 1, value 0x1BD)
Error[477]   : fixup overflow in expression (location 0x1B3E (0x1B30+14), size 1, value 0x1BC)
Advisory[1]   : too many errors (31)
BUILD FAILED: Mon Dec 17 11:42:50 2012
877A编译结果为:
Clean: Deleting intermediary and output files.
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.obj".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.cce".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.obj".
Clean: Deleted file "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.cce".
Clean: Done.
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -C -E"10w_ pump.cce" "10w_ pump.c" -O"10w_ pump.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F877A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 39 : non-prototyped function declaration for "inital"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 61 : non-prototyped function declaration for "delay30us"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 70 : non-prototyped function declaration for "delay1ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 79 : non-prototyped function declaration for "delay400us"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 88 : non-prototyped function declaration for "delay50ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 97 : non-prototyped function declaration for "delay500ms"
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 109 : non-prototyped function declaration for "delay1s"
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 631 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 639 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 646 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 698 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 707 : implicit conversion of float to integer
Warning[356] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 714 : implicit conversion of float to integer
Warning[349] E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.c 779 : non-prototyped function declaration for ""
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -C -E"usart.cce" "usart.c" -O"usart.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F877A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details
Executing: "C:\Program Files\HI-TECH Software\PICC\9.50\BIN\PICC.EXE" -E"BIC3.lde" "E:\company\10W_PUMP_CTRL\PIC\SourceCode\10w_ pump.obj" "E:\company\10W_PUMP_CTRL\PIC\SourceCode\usart.obj" -M"BIC3.map" -O"BIC3.cof" -O"BIC3.hex" -Q -MPLAB -16F877A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details

Memory Usage Map:

Program space:
    CODE                 used   ACBh (  2763) of  2000h words   ( 33.7%)
    CONST                used     0h (     0) of  2000h words   (  0.0%)
    ENTRY                used    16h (    22) of  2000h words   (  0.3%)
    STRING               used     0h (     0) of  2000h words   (  0.0%)

Data space:
    BANK0                used    35h (    53) of    60h bytes   ( 55.2%)
    BANK1                used    18h (    24) of    50h bytes   ( 30.0%)
    BANK2                used     6h (     6) of    60h bytes   (  6.3%)
    BANK3                used     0h (     0) of    60h bytes   (  0.0%)
    COMBANK              used     1h (     1) of    10h bytes   (  6.3%)

EEPROM space:
    EEDATA               used     0h (     0) of   100h bytes   (  0.0%)

ID Location space:
    IDLOC                used     0h (     0) of     4h bytes   (  0.0%)

Configuration bits:
    CONFIG               used     0h (     0) of     1h word    (  0.0%)

Summary:
    Program space        used   AE1h (  2785) of  2000h words   ( 34.0%)
    Data space           used    54h (    84) of   170h bytes   ( 22.8%)
    EEPROM space         used     0h (     0) of   100h bytes   (  0.0%)
    ID Location space    used     0h (     0) of     4h bytes   (  0.0%)
    Configuration bits   used     0h (     0) of     1h word    (  0.0%)

Loaded E:\company\10W_PUMP_CTRL\PIC\SourceCode\BIC3.cof.
BUILD SUCCEEDED: Mon Dec 17 11:43:12 2012
不知哪位大侠帮忙解释一下~~谢谢!

使用特权

评论回复
板凳
diweo| | 2012-12-23 18:07 | 只看该作者
本帖最后由 diweo 于 2012-12-23 18:09 编辑

你要理解什么是“General Purpose Register”。
你贴的图是figure2-4,很明显,只有bank0和bank1里面各有96bytes的GPR,你强行把变量定义在bank2里面当然是不行的。SFR可以在bank2里面不等于变量也可以定义在那里。
请仔细对比数据手册的Figure2-3和Figure2-4.

使用特权

评论回复
地板
yewuyi| | 2012-12-24 08:47 | 只看该作者
1、不是所有的PIC16都有4个BANK空间的。
2、特殊寄存器地址和变量存放的RAM空间不是一个含义。
3、General Purpose Register才是你变量使用的空间
4、在PICC中尽量不要使用变量绝对定位的方式
5、如果可能,升级使用PICC9.80以上版本,在高版本PICC中,已经不需要工程师自己确定变量的BANK空间,编译器会自动给你处理到相关BANK中(此点未经最终核实,但根据我使用PICC9.80的观察来看,实际已经是这样了)

使用特权

评论回复
5
wdliming|  楼主 | 2012-12-24 15:31 | 只看该作者
yewuyi 发表于 2012-12-24 08:47
1、不是所有的PIC16都有4个BANK空间的。
2、特殊寄存器地址和变量存放的RAM空间不是一个含义。
3、General  ...

版主好意见啊,在程序里自己定义bank还真是费劲~

使用特权

评论回复
6
Thomas@wang| | 2020-3-9 16:00 | 只看该作者
拜求大神指教,微芯的PIC16F1825 TSSOP8L 找寻国产MCU替代。月需求5000片。
目前情况是:1,有烧录程序估计没有源代码 2,该芯片只是驱动8个LED跑马灯,VDD5V,I2C协议通讯。
3,上位机(主控机)通过I2C写给F1825数据,该芯片再解码去驱动不同LED的显示组合代表上位机的设备的状态。
4,涉及的技术问题:上位机数据的抓取;F1825解码,协议;重新编写程序。有熟悉的望留下联系方式。谢谢!

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:我的未来不是梦

76

主题

913

帖子

4

粉丝