Problems with 16F1939
Moderator: Benj
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Problems with 16F1939
I tried to program a chip with Flowcode 4 But there is a problem.
If I try to configure the chip It does not allow the Chip 16F1939
Aso the Option Internal Oscillator ist not available.
When I press Autodetect it says Usb Cable not Connected.
I am using Pickit2 and the Pic Kit 2 Programm finds the chip.
What is the problem?
If I try to configure the chip It does not allow the Chip 16F1939
Aso the Option Internal Oscillator ist not available.
When I press Autodetect it says Usb Cable not Connected.
I am using Pickit2 and the Pic Kit 2 Programm finds the chip.
What is the problem?
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Order not received.
Hi Creative25
If not then make sure you have the latest V4.5.18.74 installed. (check version by help/about Flowcode menu)
Martin
Can you select 16F1939 from View and project options menu?Creative25 wrote:I tried to program a chip with Flowcode 4 But there is a problem.
If I try to configure the chip It does not allow the Chip 16F1939
If not then make sure you have the latest V4.5.18.74 installed. (check version by help/about Flowcode menu)
You need to be in the expert configuration mode. Its best to place in that mode permanently. To do that from Chip menu, select Configure. select option on the newly opened window. Finally un-tick use simple config screen. then press OK. Now when you use Chip configure, All the osc options will be there.Creative25 wrote:Aso the Option Internal Oscillator ist not available.
It will only auto detect if not using the Pickit2, you have a +14ish Volt supply (I use a stablised 12V as thats all I had at the time, and works fine) and USB/ICD jumper is on USB and PSU/USB jumper is on PSUCreative25 wrote:When I press Autodetect it says Usb Cable not Connected.
I am using Pickit2 and the Pic Kit 2 Programm finds the chip.
What is the problem?
Martin
Martin
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
- Contact:
Re: Order not received.
I didn't know about that thanks .medelec35 wrote:...
Finally un-tick use simple config screen
...
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Order not received.
Thanks for all your advice.
I could select the correct chip.
And changed to expert mode. Now there are more options for the Oscillator, but I still can not find an internal one.
What is it called in Expert mode?
I could select the correct chip.
And changed to expert mode. Now there are more options for the Oscillator, but I still can not find an internal one.
What is it called in Expert mode?
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Order not received.
Your welcome.Spanish_dude wrote: I didn't know about that thanks .
Glad I was some help Nicolas
It is calledCreative25 wrote: What is it called in Expert mode?
Code: Select all
INTOSC Oscillator
This is the list of internal frequencies you can have (range from 31KHz to 32MHz):
Code: Select all
000x = 31 kHz LF
0010 = 31.25 kHz MF
0011 = 31.25 kHz HF(1)
0100 = 62.5 kHz MF
0101 = 125 kHz MF
0110 = 250 kHz MF
0111 = 500 kHz MF (default upon Reset)
1000 = 125 kHz HF(1)
1001 = 250 kHz HF(1)
1010 = 500 kHz HF(1)
1011 = 1MHz HF
1100 = 2MHz HF
1101 = 4MHz HF
1110 = 8 MHz or 32 MHz HF(see Section 5.2.2.1 “HFINTOSC”)
1111 = 16 MHz HF
bit 2 Unimplemented: Read as ‘0’
bit 1-0 SCS<1:0>: System Clock Select bits
1x = Internal oscillator block
01 = Timer1 oscillator
00 = Clock determined by FOSC<2:0> in Configuration Word 1.
Then enable PLL. the PLL is a multiplier by 4 so internal osc will run at 8MHz x 4 = 32MHz
How I determine osccon value (again use 8MHz as an example) is:
Look at required binary value for bits 6 to 3.
8MHz = 1110. Use scientific calculator built into windows,and place in binary mode. I enter 1110 then since these are bits 6 to 3 I just add an addition 3 lots of 0's = bits 2 to 0
8MHz = 1110000. Then Select Hex and answer is 70 so you need to add a C code box at the start of main and inside needs to be osccon=0x70;
0x (zero not letter O) means the value is in hex
Don't forget the semicolon at the end or code will fail to compile.
Martin
Martin
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Order not received.
Thanks for all the Advice.
I got my Chip programmed and it is running.
I did not use oscon but set the speed in the Project options.
Does this work as well?
I have a little problem with the four digit 7 Segment display.
So all the polarities are the opposite way around. For this reason the display does not work.
I know the chip is working because I get a voltage on the corresponding pins.
Can I change some settings so that the segments are sunk instead of sourced?
How do I source the Cathods Will a Tip 120 Transistor work?
Thanks
I got my Chip programmed and it is running.
I did not use oscon but set the speed in the Project options.
Does this work as well?
I have a little problem with the four digit 7 Segment display.
So all the polarities are the opposite way around. For this reason the display does not work.
I know the chip is working because I get a voltage on the corresponding pins.
Can I change some settings so that the segments are sunk instead of sourced?
How do I source the Cathods Will a Tip 120 Transistor work?
Thanks
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Order not received.
Your welcome.Creative25 wrote:Thanks for all the Advice.
Probably not work well at all.Creative25 wrote:I did not use oscon but set the speed in the Project options.
Does this work as well?
The OSC in the project options are just for all the timings, eg. delays.
It will not force the actual osc speed of the chip to change to the same speed that's set in the options.
So if you make a bit high, then delay 500ms, same bit low, delay for 500ms.
You will find the delay will not be 500ms because the osc of chip is running at a different frequency to osc in project options.
I could be wrong but the default for flowcode is common anode. So the segments are currently sunk! This means the anode has to be a +5V to be enabled. Then the segments are sunk to 0V to light LEDCreative25 wrote: I have a little problem with the four digit 7 Segment display.
So all the polarities are the opposite way around. For this reason the display does not work.
I know it is working because I get a voltage on the corredponding pins.
Can I change some settings so that the segments are sunk instead of sourced?
How do I source the Cathods Will a Tip 120 Transistor work?
Thanks
E.g If Anode is connected to port A0, Segment a=port B0, Segment b=port B1, Segment c=port B2, Segment d=port B3, Segment e=port B4, Segment f=port B5 & Segment g=port B6. For a number 1 to be showing. Port A0 = +5V, port B1 and B2 = 0v & B0,B3,B4,B5 = +5V. hence active port B bits = 0V are sinking current, which light LED's
Have you got common anode, or common cathode?
If you can let me know which one you have (perhaps you have a link to the data sheet?) then I can help you further.
To change from common anode to common cathode only way I could think of.
is instead of using quad 7segment you could use four single LED 7segment displays.
Then if you look at external properties you can change form common anodes to common cathodes.
Then the common bit can be set for different bits, and all the segments can be set for the same
bits.
the secret of controlling the multiple 7seg LED's is only have 1 of displays on at any one time, but at a fast enough rate so it looks like they are all on.
You can use interrupts for this.
I did just that here:
http://www.matrixmultimedia.com/mmforum ... 737#p20644
Important: Don't forget you will need a resistor connected to each individual segment. Take a look a look at the data sheet to quad 7seg desplay Matrix Multimedia sell:
http://www.matrixmultimedia.com/datashe ... 8-30-1.pdf
Hope this helps.
Martin
Martin
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Order not received.
Thanks thats a lot of Information.
Ok I will try to add the c code to my program.
Which speed do I need for a seven segment display and two ADC sensors,
Is 4 MHz enough?
I do not know exactly what is common anode or common cathode all I know it needs a Positive voltage on the common terminals in order to light up.
I tested it on a spare display.
I mistakenly put a ULN 2003 Driver which supplies an earth to the common pins. Is there a equivalent driver that can supply a positive voltage?
Or should I simply use trinsistors?
You can find the datasheet at the following link:
http://www.everlight.com/display_datasheet/ds300180.pdf
Ok I will try to add the c code to my program.
Which speed do I need for a seven segment display and two ADC sensors,
Is 4 MHz enough?
I do not know exactly what is common anode or common cathode all I know it needs a Positive voltage on the common terminals in order to light up.
I tested it on a spare display.
I mistakenly put a ULN 2003 Driver which supplies an earth to the common pins. Is there a equivalent driver that can supply a positive voltage?
Or should I simply use trinsistors?
You can find the datasheet at the following link:
http://www.everlight.com/display_datasheet/ds300180.pdf
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
- Contact:
Re: Order not received.
4MHz is more than enough to display something on multiple 7 segment displays.
Just make sure you're refresh ration for the displays isn't lower than 50Hz or you'll see the displays going on and off.
I always try to enable each display 5ms (if you have 4 of them).
Have you looked at the 7 segment E-Block's datasheet ?
The schematic is provided in it.
Just make sure you're refresh ration for the displays isn't lower than 50Hz or you'll see the displays going on and off.
I always try to enable each display 5ms (if you have 4 of them).
Have you looked at the 7 segment E-Block's datasheet ?
The schematic is provided in it.
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Order not received.
Thanks a lot.
I have Looked at the 7 segment E-Block's datasheet.
The transistor is a sot 23 package, difficult for beginners is there an equavelant in a 3 Legged package?
I have Looked at the 7 segment E-Block's datasheet.
The transistor is a sot 23 package, difficult for beginners is there an equavelant in a 3 Legged package?
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Order not received.
Different people will have different preferences, and there is a huge choice to choose from.
For NPN general purpose, I use BC337. This is because of the higher than average 800mA collector current that can be drawn. I have use these devices for controlling small relays, so will work for Common Anode (where all the anodes are connected together, and connected to +supply. In this case since display need to be turned on/off via NPN transistor) 7 SEG Displays.
Martin
For NPN general purpose, I use BC337. This is because of the higher than average 800mA collector current that can be drawn. I have use these devices for controlling small relays, so will work for Common Anode (where all the anodes are connected together, and connected to +supply. In this case since display need to be turned on/off via NPN transistor) 7 SEG Displays.
Martin
Martin
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Order not received.
I changed the code.medelec35 wrote:Your welcome.Creative25 wrote:Thanks for all the Advice.Probably not work well at all.Creative25 wrote:I did not use oscon but set the speed in the Project options.
Does this work as well?
The OSC in the project options are just for all the timings, eg. delays.
It will not force the actual osc speed of the chip to change to the same speed that's set in the options.
So if you make a bit high, then delay 500ms, same bit low, delay for 500ms.
You will find the delay will not be 500ms because the osc of chip is running at a different frequency to osc in project options.I could be wrong but the default for flowcode is common anode. So the segments are currently sunk! This means the anode has to be a +5V to be enabled. Then the segments are sunk to 0V to light LEDCreative25 wrote: I have a little problem with the four digit 7 Segment display.
So all the polarities are the opposite way around. For this reason the display does not work.
I know it is working because I get a voltage on the corredponding pins.
Can I change some settings so that the segments are sunk instead of sourced?
How do I source the Cathods Will a Tip 120 Transistor work?
Thanks
E.g If Anode is connected to port A0, Segment a=port B0, Segment b=port B1, Segment c=port B2, Segment d=port B3, Segment e=port B4, Segment f=port B5 & Segment g=port B6. For a number 1 to be showing. Port A0 = +5V, port B1 and B2 = 0v & B0,B3,B4,B5 = +5V. hence active port B bits = 0V are sinking current, which light LED's
Have you got common anode, or common cathode?
If you can let me know which one you have (perhaps you have a link to the data sheet?) then I can help you further.
To change from common anode to common cathode only way I could think of.
is instead of using quad 7segment you could use four single LED 7segment displays.
Then if you look at external properties you can change form common anodes to common cathodes.
Then the common bit can be set for different bits, and all the segments can be set for the same
bits.
the secret of controlling the multiple 7seg LED's is only have 1 of displays on at any one time, but at a fast enough rate so it looks like they are all on.
You can use interrupts for this.
I did just that here:
http://www.matrixmultimedia.com/mmforum ... 737#p20644
Important: Don't forget you will need a resistor connected to each individual segment. Take a look a look at the data sheet to quad 7seg desplay Matrix Multimedia sell:
http://www.matrixmultimedia.com/datashe ... 8-30-1.pdf
Hope this helps.
Martin
Now what should I do in Project options.
Put the same speed, or can it be neglected.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Order not received.
The Clock Speed in project options must ALWAYS to set to same speed as the Oscillator on your hardware.Creative25 wrote: Now what should I do in Project options.
Put the same speed, or can it be neglected.
Never neglect that setting!
If it's not set to the same speed, then delays, LCD, RS232 etc will not work as expected.
Martin
Martin
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Order not received.
So I Guess project options compiles the program for the oscillator speed and "osccon" sets the oscillator to run on the correct speed.
Is that correct?
Is that correct?
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Order not received.
That's correct. But osccon is ONLY for when your using the microcontroller internal oscillator.Creative25 wrote:So I Guess project options compiles the program for the oscillator speed and "osccon" sets the oscillator to run on the correct speed.
Is that correct?
If using an external crystal 4MHz or above e.g. 19.660800MHz, then set osc in project options to 19660800, and in Chip,Configure menu (Expert Config screen) set Oscillator configuration to HS.
Martin
Martin
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Order not received.
I just got it running.
I used the Bc337 transistors with a 1K resisor.
Now it is displaying the number that I program into it.
I want to take it a step further and display an internal value from an adc Converter.
What do I need to modify on my program so it will display an Int value as a number with a decimal point?
I used the Bc337 transistors with a 1K resisor.
Now it is displaying the number that I program into it.
I want to take it a step further and display an internal value from an adc Converter.
What do I need to modify on my program so it will display an Int value as a number with a decimal point?
- Attachments
-
- Lcd experiment.fcf
- (13 KiB) Downloaded 329 times
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Order not received.
I changed the Program a bit I got it working now it can display any number i enter it into "voltage = 5798" etc.
However if i use the adc macro to displaay a battery voltage it works on flowcode but on real hardware it displays different numbers at random "7.68 or 00.00 or 2.56 or 5.12"
What am I doing wrong? Can any one tell me how to use the ADC function correctly?
However if i use the adc macro to displaay a battery voltage it works on flowcode but on real hardware it displays different numbers at random "7.68 or 00.00 or 2.56 or 5.12"
What am I doing wrong? Can any one tell me how to use the ADC function correctly?
- Attachments
-
- Lcd experiment4.fcf
- (9 KiB) Downloaded 334 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Order not received.
I have created a flowchart that can display a voltage on the 7SEG LED between 0 and 5V with 100mV resolution and a decimal point. E.g 3.20
If I get a chance, I will see if I can get a higher resolution.
Flowchart uses the ADC component and convert ADC bytes to a voltage.
Although this is running with internal osc at 4MHz. This chip can work at a much higher osc speed still using internal osc but by also using the PLL
Martin
If I get a chance, I will see if I can get a higher resolution.
Flowchart uses the ADC component and convert ADC bytes to a voltage.
Although this is running with internal osc at 4MHz. This chip can work at a much higher osc speed still using internal osc but by also using the PLL
Martin
- Attachments
-
- LED Voltmeter1.fcf
- (13 KiB) Downloaded 344 times
Martin
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Order not received.
Thanks for your time and the program.
However it still does not work properly.
Actual voltage is about 2.3 volts but it jumps between 0.00 0.70 1.50 2.50 and 3.70 I still do not understand what the problem might be.
Still it is an interesting program where could I read up more about the MOD function?
Could it be a hardware problem or that the program does not compile properly?
However it still does not work properly.
Actual voltage is about 2.3 volts but it jumps between 0.00 0.70 1.50 2.50 and 3.70 I still do not understand what the problem might be.
Still it is an interesting program where could I read up more about the MOD function?
Could it be a hardware problem or that the program does not compile properly?
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Order not received.
That's odd since I got it running with a 16F883, before I posted flowchart, and display stays solid, displaying actual voltage. Currently it's not moving from 2.60Creative25 wrote: However it still does not work properly.
Actual voltage is about 2.3 volts but it jumps between 0.00 0.70 1.50 2.50 and 3.70 I still do not understand what the problem might be.
I will try on a 16F1827 on Monday.
I'm wondering if your hardware is not running at correct speed. Im sure I had similar hardware problem when the 100uS delay was too long.
When it was about 100mS, my display also showed random numbers.
1st thing I do is set a flowchart to toggle a pin 1Hz, and then check hardware is actually running at the expected 1Hz
The other thing is if you manually set the voltage variable to say 320 Do you get 3.20 on your display?
Martin
Martin
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Order not received.
Ok at the beginning of refresh I added the calculation voltage = 320 and it shows 3.20 and it stays there.
Te refresh rate is abit slow and the numbers are flickering.
Also I tried what happens when I configure ADC5 which is not connected and it also shows random numbers.
Thanks
Te refresh rate is abit slow and the numbers are flickering.
Also I tried what happens when I configure ADC5 which is not connected and it also shows random numbers.
Thanks
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Order not received.
If ADC channel is floating i.e unconnected, then you will also get random numbers. This is because there is a very high input resistance on the input. so instead of picking up the supply voltage, the i/p is just picking up electrical noise.
You must make sure the correct pin (in the case of AN4 = pin7 of chip) is connected to + supply that is being measured, or if using a pot then to the centre terminal.
Also the 0V or gnd of supply (or pot) is connected to Vss of chip.
I would recommend measuring the voltage at the correct pin, and make sure it's stable at correct voltage.
Martin
You must make sure the correct pin (in the case of AN4 = pin7 of chip) is connected to + supply that is being measured, or if using a pot then to the centre terminal.
Also the 0V or gnd of supply (or pot) is connected to Vss of chip.
I would recommend measuring the voltage at the correct pin, and make sure it's stable at correct voltage.
Martin
Martin
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Order not received.
My setup is like this, I get power from a battery, that then goes trough a voltage regulator.
I want to measure the voltage of the battery that is supplying power it will be a 12 volt battery.
In order to measure the voltage I made a voltage divider with one 1 K resistor connected to vss, the other is a 3K resistor connected to the supply before the regulator. Currently I am testing it with a 9 volt battery. Power on pin 7 is stable 2.29 volts.
Is that a problem?
I want to measure the voltage of the battery that is supplying power it will be a 12 volt battery.
In order to measure the voltage I made a voltage divider with one 1 K resistor connected to vss, the other is a 3K resistor connected to the supply before the regulator. Currently I am testing it with a 9 volt battery. Power on pin 7 is stable 2.29 volts.
Is that a problem?
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Order not received.
Hi again,
Here is a summary of all my findings.
I changed the Program a bit according to my understanding "osccon=0x60;" Is 2Mhz on a 1939 Chip
So I changed it to "osccon=0x68" wich is 4Mhz acccording to my understanding.
Is that correct?
If pin ADC4 is connected it gives me same random numbers. 0.00 0.70 1.20 2.50 3.70
They are the same whatever voltage comes in.
If pin ADC4 is disconnected it gives me different random numbers.
Voltage at ADC4 Pin number seven is stable at 2.29 volts.
I found some error messages while compiling to Hex.
What are they meaning?
Here is a summary of all my findings.
I changed the Program a bit according to my understanding "osccon=0x60;" Is 2Mhz on a 1939 Chip
So I changed it to "osccon=0x68" wich is 4Mhz acccording to my understanding.
Is that correct?
If pin ADC4 is connected it gives me same random numbers. 0.00 0.70 1.20 2.50 3.70
They are the same whatever voltage comes in.
If pin ADC4 is disconnected it gives me different random numbers.
Voltage at ADC4 Pin number seven is stable at 2.29 volts.
I found some error messages while compiling to Hex.
What are they meaning?
Code: Select all
File name: C:\Users\Admin\Desktop\LED Voltmeter2.c
Generated by: Flowcode v4.5.18.74
Date: Wednesday, September 28, 2011 13:29:43
Licence: Student
Registered to: Ueli Meier
NOT FOR COMMERCIAL USE
http://www.matrixmultimedia.com
Launching the compiler...
c:\program files\matrix multimedia\flowcode v4\boostc\boostc_pic16_flowcode.exe -v -t PIC16F1939 "LED Voltmeter2.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday
Licensed to FlowCode User under Single user Standard License for 1 node(s)
Limitations: PIC12,PIC16 max code size:4096 words, max RAM banks:Unlimited, Non commercial use only
LED Voltmeter2.c
Starting preprocessor: c:\PROGRA~1\MATRIX~1\FLOWCO~1\boostc\pp.exe "LED Voltmeter2.c" -i c:\PROGRA~1\MATRIX~1\FLOWCO~1\boostc\include -d _PIC16F1939 -la -c2 -o "LED Voltmeter2.pp" -v -d _BOOSTC -d _PIC16 -d _PIC16x -d _CHAR_INDEX
.............
LED Voltmeter2.c success
success
Return code = 0
Launching the linker/assembler...
c:\program files\matrix multimedia\flowcode v4\boostc\boostlink_pic.exe -ld "C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\lib" libc.pic16.lib flowcode.pic16.lib rand.pic16.lib float.pic16.lib "LED Voltmeter2.obj" -t PIC16F1939 -d "C:\Users\Admin\Desktop" -p "LED Voltmeter2"
BoostLink Optimizing Linker Version 7.03
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday
Caution: argument of 'delay_us' calls must have a value of 1 or more
Caution: Delay inaccurrate: 'delay_us', Delay overhead:0.01ms, Unit delay:0.001ms, Delay resolution:4 units
Warning unreferenced functions removed:
FCI_FLOAT_TO_STRING in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCI_NUMBER_TO_HEX in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCI_STRING_TO_INT in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCI_STRING_TO_FLOAT in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
Wdt_Delay_S in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
Wdt_Delay_Ms in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
isinf in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCD_ADC0_ReadAsInt in: C:\Users\Admin\Desktop\LED Voltmeter2.c
FCD_ADC0_ReadAsVoltage in: C:\Users\Admin\Desktop\LED Voltmeter2.c
FCD_ADC0_ReadAsString in: C:\Users\Admin\Desktop\LED Voltmeter2.c
Building CASM file
Serious Warning: Possible sw stack corruption, function '__div_16_16' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
Memory Usage Report
===================
RAM available:1024 bytes, used:72 bytes (7.1%), free:952 bytes (92.9%),
Heap size:336 bytes, Heap max single alloc:95 bytes
ROM available:16384 words, used:553 words (3.4%), free:15831 words (96.6%)
success
Return code = 0
FINISHED
- Steve
- Matrix Staff
- Posts: 3421
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: Order not received.
Most of the warnings can be ignored, with the exception of this one:
This shows that your interrupt routines involve a fair amount of processing. Ideally you should keep these interrupt routines as simple as possible.
If you search for "Possible sw stack corruption" on the forum, you'll find lots of posts detailing this issue and offering suggestions for fixing it.
Code: Select all
Serious Warning: Possible sw stack corruption, function '__div_16_16' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
If you search for "Possible sw stack corruption" on the forum, you'll find lots of posts detailing this issue and offering suggestions for fixing it.