View previous topic :: View next topic |
Author |
Message |
karthickiw
Joined: 09 Aug 2007 Posts: 82 Location: TN, India
|
Problem with Proteus and 24FJ128J010 |
Posted: Sun Dec 19, 2010 8:11 am |
|
|
Hai Friends,
I am new for 24F series Microcontroller. I write below program in ccs compiler (version 4.104) and compiled the program without any error. But I load into Proteus simulator. It don't run program and show the error. I don't find where a problem is created?
Problem in Proteus or ccs?
Please help to find solution the this problem.
Code: |
#include<24FJ128GA010.h>
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOJTAG //JTAG disabled
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOWRT //Program memory not write protected
#FUSES NODEBUG //No Debug mode for ICD
#FUSES ICSP1 //ICD uses PGC1/PGD1 pins
#FUSES NOWINDIS //Watch Dog Timer in Window mode
#FUSES WPRES128 //Watch Dog Timer PreScalar 1:128
#FUSES WPOSTS16 //Watch Dog Timer PostScalar 1:32768
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES PR //Fast RC Oscillator with Post Scaler
#FUSES NOCKSFSM //Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES NOOSCIO //OSC2 is clock output
#FUSES HS //High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD)
#use delay(clock=8000000)
void main()
{
setup_spi( FALSE );
setup_spi2( FALSE );
setup_wdt(WDT_OFF);
setup_timer1(TMR_DISABLED);
While(True)
{
output_high(pin_f0);
delay_ms(1000);
output_low(pin_f0);
delay_ms(1000);
}
}
|
Circuit
Error
|
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1937 Location: Norman, OK
|
|
Posted: Sun Dec 19, 2010 8:25 am |
|
|
I expect the problem is in Proteus and this is not a Proteus support forum.
The forum is located here: http://support.labcenter.co.uk/forums/ _________________ Google and Forum Search are some of your best tools!!!! |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9247 Location: Greensville,Ontario
|
|
Posted: Sun Dec 19, 2010 9:33 am |
|
|
Gee a simulator that doesn't work ?? NOT surprising to me !
However in your schematic the crystal appears to be 'wired' incorrectly. Errors include no caps and wrong pin assignments.
I'd have thought a real simulator would pick that up ! |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Mon Dec 20, 2010 1:24 am |
|
|
Seems like Proteus doesn't know about basic PIC24 resources, said "illegal memory address 032A" is a
PIC special function register. If you want a simulator, that can be expected to know the chip correctly, go for Microchip
MPLAB. It's free. |
|
|
|