View previous topic :: View next topic |
Author |
Message |
tony Guest
|
pic18f4525 |
Posted: Wed Mar 02, 2005 9:45 am |
|
|
Hello,
i have a problem about PIC18F4525.
On devices supported CCS, 18F4525 has:
ROM RAM I/O
24576 4096 36
On site Microchip, 18F4525 has:
ROM RAM I/O
49152 3968 36
What is it possible?
Besides, i have MPLAB 6.60 and CCS 3.174 and i haven't the library of 18f4525. What can you do for to use the PIC18F4525?
Thanks |
|
|
Ttelmah Guest
|
|
Posted: Wed Mar 02, 2005 10:18 am |
|
|
The big difference in the first numbers, is between 'bytes', and 'words'. CCS, are quoting the number of words of program memory (how many instructions it can efectively store), while the figure you are looking at on the MicroChip site, is the number of bytes (it does carefully say this in brackets).
The 'memory space', is 4096 locations, but there are only 3968 useable locations, since the rest are used by the internal registers of the chip. The CCS figure is the entire 'space' they have to handle, while the MicroChip figure is the amount of useable RAM. If you look at the 'map', in device editor, you will find the top 128bytes are flagged as already used.
Both sets of figures are 'right'.
Best Wishes |
|
|
Guest
|
|
Posted: Wed Mar 02, 2005 10:45 am |
|
|
Ok, thank a lot but i have MPLAB 6.60 and CCS 3.174 and i haven't the library of 18f4525. What can you do for to use the PIC18F4525?
Thanks in advance
Ttelmah wrote: | The big difference in the first numbers, is between 'bytes', and 'words'. CCS, are quoting the number of words of program memory (how many instructions it can efectively store), while the figure you are looking at on the MicroChip site, is the number of bytes (it does carefully say this in brackets).
The 'memory space', is 4096 locations, but there are only 3968 useable locations, since the rest are used by the internal registers of the chip. The CCS figure is the entire 'space' they have to handle, while the MicroChip figure is the amount of useable RAM. If you look at the 'map', in device editor, you will find the top 128bytes are flagged as already used.
Both sets of figures are 'right'.
Best Wishes |
|
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Wed Mar 02, 2005 12:32 pm |
|
|
To support that chip you have to upgrade the compiler. Just having the header file won't help. The chip support for custom features related to that chip is built into the compiler. |
|
|
Guest
|
|
Posted: Thu Mar 03, 2005 1:37 am |
|
|
Thank you very much!
dyeatman wrote: | To support that chip you have to upgrade the compiler. Just having the header file won't help. The chip support for custom features related to that chip is built into the compiler. |
|
|
|
Tony Guest
|
|
Posted: Thu Apr 28, 2005 9:12 am |
|
|
Hello everyone,
i upgraded the compiler with header file 18f4525.h but when i'm connecting to MPLAB ICD2, the ICD self test failed.
Why?
I'm seeing ICD2 Settings (status tab) and results:
Target Vdd Pass! OK!
Module Vpp HIGH????
MCLR Gnd Pass! OK!
MCLR Vdd Pass! OK!
MCLR Vpp HIGH????
WHy?
Thank in advance!
Tony |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Apr 28, 2005 9:48 am |
|
|
The wording of your sentences has put some questions in my mind.
Here you say,
Quote: | i upgraded the compiler with header file 18f4525.h |
Does this mean that you got somebody to email you the 18F4525.H file
and you copied into the c:\Program Files\Picc\Devices folder, and so now
you think you "upgraded" the compiler ?
If so, you did not upgrade the compiler. It won't work.
Then you say,
Quote: | but when i'm connecting to MPLAB ICD2, the ICD self test failed. |
Here, you refer to your debugger in the 2nd case as an "ICD".
Is this just a typo, or do you really have an old Microchip ICD "1",
or a CCS ICD, and you're trying to use it with the modern MPLAB ?
If so, it won't work. You need the Microchip ICD2 for MPLAB. |
|
|
tony Guest
|
|
Posted: Thu Apr 28, 2005 10:07 am |
|
|
i copied into the c:\Program Files\Picc\ the files pcb.crg, pch.crg, pcm.crg
and ran pcwhupd.exe.
I think that is upgrade of compiler. In fact the release of CCS is last 3.224.
Besides i have the Microchip ICD2 for MPLAB and there is not problem when i'm connecting with PIC18F452. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
tony Guest
|
|
Posted: Fri Apr 29, 2005 2:55 am |
|
|
I upgraded the release of MPLAB from 6.53 to 7.10 and now it works!
Thanks a lot!!! |
|
|
tony Guest
|
|
Posted: Fri Apr 29, 2005 7:52 am |
|
|
Hello,
unfortunately i have got another problem.
MPLAB 7.10 and CCS 3.224
I have to transmitter a data packet in synchronous Master mode.
The same routine works with PIC18F452 but not with PIC18F4525.
That means with PIC18F4525 the routine appears blocked and doesn't advance as index of byte transmitted.
Why? Can you help me?
Thanks in advance. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Fri Apr 29, 2005 9:12 am |
|
|
Quote: | unfortunately i have got another problem. |
For an optimal response you should post new unrelated questions in a new thread. |
|
|
tony Guest
|
tbe pic18f4525 |
Posted: Thu May 05, 2005 10:57 am |
|
|
#include <18f4525.h>
//#include <18f452.h>
#int_tbe
void tbe_isr()
{
disable_interrupts(INT_TBE);
TXREG=0x55;
indByte ++;
enable_interrupts(INT_TBE);
return;
}
void main()
{
while (TRUE)
{
BRG16 = LOW;
SPBRG = 207;
SYNC = HIGH;
SPEN = HIGH;
CSRC = HIGH;
TXIE = HIGH;
TXREG=0x55;
indByte = 0;
while (indByte < 5)
{
TXEN = HIGH;
}
TXEN = LOW;
}
return;
}
This code works with PIC18F452 and doesn't work with PIC18F4525, that is the debugger remains in the loop (while (indByte <5)) with indbyte always = 1 and doesn't go on.
Why?
MPLAB is 7.10 and CCS, just buyed, is 3.224.
Maybe, are there the bugs in ccs 3.224 with 18f4525?
Thanks a lot in advance
Tony |
|
|
|