On Sunday 13 July 2008, [EMAIL PROTECTED] wrote: > If the code doesn't run as expected then there is a problem in your > hardware, wirering, config etc. etc. >
Re-written the machine code for initialisation in C. I suspect, but have not checked, that it is something to do with the value I set in CCP1CON. Will have to re-run my ealier code for 16f628 and try tweeking that parameter. > Things to check: > - Does your cpu runs at all? Toggle a bit on the pwm port and try to > measure the frequency. > - What else are you doing in your Programm. For testing you should have > after the initialization just a while(1) {} loop in your main(). > - Important: Did you enable the watchdog in your config register? If so > disable is. Yes, I've had circuits that worked in the simulator but did nothing on the board. Usually config bit problems. Just running it against gpsim at the moment. Not built the board yet. Would be a good plan to do so just to check the PWM bit. Next thing to do is to get a to d working, however, I have had that working already on a 16f877, so I hopefully am ahead of the game a little there. Thanks for your help. -- Peter Chant http://www.petezilla.co.uk ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user