| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		
			andreluizeng
 
 
  Joined: 04 Apr 2006 Posts: 117 Location: Brasil 
			
			 
			 
			 
			
			
			
			 
			
			
  
		  | 
		
			
				| pic18f4525 | 
			 
			
				 Posted: Tue May 16, 2006 4:47 pm     | 
				     | 
			 
			
				
  | 
			 
			
				hi people
 
 
my compiler's version is 3.221 and im having problems with pic 18f4525
 
 
does it compiler's version compiles softwares for 18f4525 ??
 
 
and which address i need to use to pre-write values on eeprom ??
 
 
0x2100 ??
 
 
att. _________________ Andre | 
			 
		  | 
	
	
		  | 
	
	
		
			PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		 | 
	
	
		  | 
	
	
		
			andreluizeng
 
 
  Joined: 04 Apr 2006 Posts: 117 Location: Brasil 
			
			 
			 
			 
			
			
			
			 
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue May 16, 2006 5:08 pm     | 
				     | 
			 
			
				
  | 
			 
			
				thanks.. but doesnt work good
 
 
#rom 0xF0000 = {0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00}
 
 
 this is the values that i need, and after program the pic, i read again and got these values:
 
 
address    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
 
  0000      00 00 00 00 00 00 00 00 50 00 00 00 00 00 00 00 
 
  0001      00 00 00  ff  ff   ff  ff....
 
 
 
whats wrong ? _________________ Andre | 
			 
		  | 
	
	
		  | 
	
	
		
			PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue May 16, 2006 5:17 pm     | 
				     | 
			 
			
				
  | 
			 
			
				
 
One important key to success in electronics is attention to detail. | 
			 
		  | 
	
	
		  | 
	
	
		
			andreluizeng
 
 
  Joined: 04 Apr 2006 Posts: 117 Location: Brasil 
			
			 
			 
			 
			
			
			
			 
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue May 16, 2006 5:17 pm     | 
				     | 
			 
			
				
  | 
			 
			
				i wrote wrong, 
 
 
#rom 0xf000000....
 
 
 
regards. _________________ Andre | 
			 
		  | 
	
	
		  | 
	
	
		
			andreluizeng
 
 
  Joined: 04 Apr 2006 Posts: 117 Location: Brasil 
			
			 
			 
			 
			
			
			
			 
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue May 16, 2006 5:18 pm     | 
				     | 
			 
			
				
  | 
			 
			
				my keyboard sux..
 
 
i put #rom 0xf00000
 
 
 
yeah... _________________ Andre | 
			 
		  | 
	
	
		  | 
	
	
		
			andreluizeng
 
 
  Joined: 04 Apr 2006 Posts: 117 Location: Brasil 
			
			 
			 
			 
			
			
			
			 
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue May 16, 2006 5:32 pm     | 
				     | 
			 
			
				
  | 
			 
			
				hello again.
 
 
the eeprom's data size of 18f4525 is 2 bytes long..
 
 
 
now its working..
 
 
thanks _________________ Andre | 
			 
		  | 
	
	
		  | 
	
	
		
			PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		 | 
	
	
		  | 
	
	
		
			andreluizeng
 
 
  Joined: 04 Apr 2006 Posts: 117 Location: Brasil 
			
			 
			 
			 
			
			
			
			 
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue May 16, 2006 5:47 pm     | 
				     | 
			 
			
				
  | 
			 
			
				hey pcm, thanks for the help.. 
 
 
so.. i have 2 more problems.
 
 
 
the pic is reseting when i use set_pwm1_duty (), and timer 0 stops working.
 
 
 
do you have some link talking about this ?
 
 
regards.. _________________ Andre | 
			 
		  | 
	
	
		  | 
	
	
		
			PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue May 16, 2006 6:13 pm     | 
				     | 
			 
			
				
  | 
			 
			
				Disconnect the external components from the PWM output pin
 
on the PIC, and run the program.   Does the PIC still reset ? | 
			 
		  | 
	
	
		  | 
	
	
		
			andreluizeng
 
 
  Joined: 04 Apr 2006 Posts: 117 Location: Brasil 
			
			 
			 
			 
			
			
			
			 
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue May 16, 2006 6:38 pm     | 
				     | 
			 
			
				
  | 
			 
			
				pcm, no the pic stops reset, but i was using a 16f877on this project and its working good, i had to change because 877 hasnt program memory enough to my application..
 
 
what i have to do  to is works ? _________________ Andre | 
			 
		  | 
	
	
		  | 
	
	
		
			PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue May 16, 2006 6:54 pm     | 
				     | 
			 
			
				
  | 
			 
			
				It probably means that when you turn on the PWM pulses, the external
 
circuit draws too much current and loads down your power supply to
 
a voltage level which is below the Brownout Voltage setting.   This will
 
cause the PIC to reset.
 
 
There could be some other reason.   But look closely at your external
 
circuit.   Look for problems with it. | 
			 
		  | 
	
	
		  | 
	
	
		
			andreluizeng
 
 
  Joined: 04 Apr 2006 Posts: 117 Location: Brasil 
			
			 
			 
			 
			
			
			
			 
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue May 16, 2006 6:56 pm     | 
				     | 
			 
			
				
  | 
			 
			
				ok, i will change de value of my brownout...
 
 
thanks for the help..
 
 
regards _________________ Andre | 
			 
		  | 
	
	
		  | 
	
	
		
			PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Wed May 17, 2006 12:18 am     | 
				     | 
			 
			
				
  | 
			 
			
				My suggestion was really to check if a Brownout reset is occuring when
 
the PWM output is enabled.   If so, then improve the power supply so it
 
can supply enough current and keep proper regulation of the Vdd voltage. | 
			 
		  | 
	
	
		  | 
	
	
		
			andreluizeng
 
 
  Joined: 04 Apr 2006 Posts: 117 Location: Brasil 
			
			 
			 
			 
			
			
			
			 
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Wed May 17, 2006 10:33 am     | 
				     | 
			 
			
				
  | 
			 
			
				pcm,
 
 
 im going to check it, but i dont really think that is the problem,
 
i changed the value of brownout detect to 2.1V and still not working.
 
but when i disconnect the load it doesnt happen.
 
 
maybe my power supply is not working well, but it was working with the same code on 16f877, just with 18f4525 im having this problem.
 
 
the difference is that 16f877 i dont need to set the value of brownout, and the 18f4525 i do.
 
 
regards.
 
 
(sorry for my english) _________________ Andre | 
			 
		  | 
	
	
		  | 
	
	
		 |