Want to use different programmer
- Steve
- Matrix Staff
- Posts: 3434
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Want to use different programmer
Sorry - I don't have any experience with this programmer. If there is a command-line interface for it, then you should be able to use it. Presumably the information you require is in the manual for this programmer.
- Steve
- Matrix Staff
- Posts: 3434
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Want to use different programmer
You need to make sure your config word is appropriate for the chip and hardware you are using - especially the oscillator settings. There are plenty of posts on this forum that should help you with this.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Want to use different programmer
Hello,
You need to click on Chip -> Configure. This allows you to see the configuration. Switch the setting to XTAL and Watchdog to off and click ok and this should allow your chip to run using an external crystal. If you want to see the entire configuration options then click on the expert settings. Each of the settings is described in the configuration section of the device datasheet.
The OSCCON register is only used when you want to use an internal oscillator and the 16F877A does not have this functionality.
You need to click on Chip -> Configure. This allows you to see the configuration. Switch the setting to XTAL and Watchdog to off and click ok and this should allow your chip to run using an external crystal. If you want to see the entire configuration options then click on the expert settings. Each of the settings is described in the configuration section of the device datasheet.
The OSCCON register is only used when you want to use an internal oscillator and the 16F877A does not have this functionality.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Want to use different programmer
quote="scorpy77"]When i load the file into the programmer it gives me a message no configuration word in hex file.
best regards.[/quote]
If using flowcode V3 then install ppp
1st go to chip menu then select compiler options.
(just as a once off, click on ''Restore Defaults')
Then make sure 'Use external program to set configuration options' is ticked.
Click OK.
Now select 'Chip' and 'Configure...'
Click 'Switch To Expert screen' (don't let the word 'Expert' put you off!)
Now set to following settings: Click 'OK'
Now when you select 'Compile to Hex' The Configuration words should be saved.
If you have any problems and you don't mind posting your flowcode, I can change it for you and re-post it.
You should also make sure your clock speed is set to the exact frequency of your crystal e.g 4000000 if using a 4MHz crystal. Set in 'Chip' & 'Clock speed' (in flowcode V3 only)
best regards.[/quote]
If using flowcode V3 then install ppp
1st go to chip menu then select compiler options.
(just as a once off, click on ''Restore Defaults')
Then make sure 'Use external program to set configuration options' is ticked.
Click OK.
Now select 'Chip' and 'Configure...'
Click 'Switch To Expert screen' (don't let the word 'Expert' put you off!)
Now set to following settings: Click 'OK'
Now when you select 'Compile to Hex' The Configuration words should be saved.
If you have any problems and you don't mind posting your flowcode, I can change it for you and re-post it.
You should also make sure your clock speed is set to the exact frequency of your crystal e.g 4000000 if using a 4MHz crystal. Set in 'Chip' & 'Clock speed' (in flowcode V3 only)
Martin
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Want to use different programmer
Hello Scorpy
Your configuration looks ok. You could try the HS oscillator mode instead of the XT mode as 4MHz is the cut off between the modes.
Do you have to do anything on your programming hardware to connect the crystal to the device?
Your configuration looks ok. You could try the HS oscillator mode instead of the XT mode as 4MHz is the cut off between the modes.
Do you have to do anything on your programming hardware to connect the crystal to the device?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Want to use different programmer
This is the bit that appears to be the issue. The config settings are not being transferred to the programmer.scorpy77 wrote: When i load the file into the programmer it gives me a message no configuration word in hex file. do i have to manually enter the code for clock etc? .
You can always try the following:
Go back to 'chip' 'compiler options'
un-tick 'Use external program to set configuration options', then OK.
Select 'Chip' 'Configure'. Can you see 0x2007,0x3f39 in the configuration box?
If not, then try entering it.
After selecting OK then 'compile to hex'
See if you still get a 'no configuration word in hex' message.
If still having problems, can you post the compiled hex file please.
If you have MPLAB installed, you can import hex file , and set configuration settings. Save hex. That's just a temporary get around fix until issue is sorted.
Reason I have asked for your hex file is I want to see if configuration word is present, then it is possibly down to your programmer?
Martin
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Want to use different programmer
Loaded your hex in mplab, and config data is definitely being saved, and is correct.
So either is down to your programmer, or go with what Ben suggested and change oscillator setting. But that would not account for the config warning message. Can you borrow a different programmer to try? Also is your hardware connected ok?
So either is down to your programmer, or go with what Ben suggested and change oscillator setting. But that would not account for the config warning message. Can you borrow a different programmer to try? Also is your hardware connected ok?
Martin
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Want to use different programmer
Can't see any screen shots or attachments.scorpy77 wrote: did u have a look at screen shots of programmer configuration window? i also sent u the config details for the programmer.
Best Regards.
Nothing in my inbox either.
Can you also upload the the circuit + component values you are using please.
Martin
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Want to use different programmer
I'm no expert, but it looks to me like your programmer config is overwriting the config within the hex file. E.g LVP and Debug should be off. It also looks like your watchdog timer is enabled so that should be unselected as well, otherwise If you not got a several c code icons with with clear_wdt(); then your program will never run due to continuous watchdog time outs. This is what could be happening? Is there an option to load config from hex file and unselected manual settings?
Martin
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Want to use different programmer
The last two don't really matter. The LVP uses RB3 to program chip. So you are tying up a pin since if use for LVP, can't be used for general use. this makes programs more difficult to develop. Best to use HVP. There are plenty of references around about LVP and brown out etc.
Glad your up and running mate! (well hope you are, since you only said should
)
Glad your up and running mate! (well hope you are, since you only said should
Martin