dotfere.blogg.se

Pbp3 warning 202
Pbp3 warning 202









Invalid RAM location messages are also at the very beginning of the message list. Lots more of the 'Crossing page boundry' messages, the Argument out of range and Here is part of the compiler output messages. ' Scale = Scale_Upper 'Sets scaling to high range scale. ' PORTC.7 = 0 'Set amplifier range output pin low to switch hardware to high range

pbp3 warning 202

' PORTC.6 = 1 'Set current sensor load resistor range output pin high to switch hardware to high range ' Range = 1 'Set Range variable to high range 'Reading_Position Var Byte 'Position of displayed current reading - display switches depending on value > or or 1500 THEN 'Check for greater than 15 amps and then switch to high range. 'Scale VAR WORD 'Scale variable used in calibration calculations. 'Scale_Upper VAR WORD 'Scale factor divisor high range. 'Scale_Lower VAR WORD 'Scale factor divisor low range. 'Scale_Upper_EE DATA WORD 980 'Upper current range calibration EEPROM variable - value 980 stored once when device is programmed,current value stored when calibrated. 'Scale_Lower_EE DATA WORD 9275 'Lower current range calibration EEPROM variable - value 9275 stored once when device is programmed,current value stored when calibrated. 'Scale_NUMERATOR VAR WORD 'Upper value of scaling routine. 'Range VAR byte '0 = LOW range, 1 = HIGH range. 'Target VAR WORD 'Calibration target value used in CAL sub routine. 'Current_Displayed VAR WORD 'Current value sent to LCD display. 'Current_Raw VAR WORD 'Raw current reading from output of true RMS converter post amplifier. 1 = low range.ĭEFINE ADC_BITS 10 'Set number of bits in resultĭEFINE ADC_SAMPLEUS 50 'Set sampling time in uSĭEFINE ADC_CLOCK 3 'This define is inoperative on 16F88xĭEFINE ADFVR = %0011 'Set internal reference to ON and voltage to 4.096V.ĪDCON1.7 = 1 'Set A/D result to right justify.ĭEFINE EEPROM_START 8188 'Sets location of EEPROM data.ĪNSELA = %00000000 'Set Port A to digital.ĪNSELB = %00000000 'Set Port B to digital.ĪNSELC = %00000001 'Set Port C to digital with the exception of AN4 on PortC.0. TRISC.7 = 0 'Set PORTC.7 to output - amplifier range output. TRISC.6 = 0 'Set PORTC.6 to output - current sensor range output. TRISC.5 = 1 'Set PORTC.5 to input - CAL switch input TRISC.2 = 0 'Set PORTC.2 to output - PWM signal for 0.1V/A analog output. TRISC.0 = 1 'Set PORTC.0 to input - A/D input Here's my test code, totally stripped down for debugging:ĭEFINE FOSC = HFINTOSC 'Internal clock.ĭEFINE IRCF = %1111 'Set internal clock to 16 MHz. While I expected to have some issues with the port, I'm out of ideas with a few compiler warnings. SameĮxact pinout, more memory, but most important, the 16F1509 has an internal voltage reference for the A/D. No microcontroller expert here, but I made it work. Necessary, scale and parse the value, and send to a LCD display. It's a high current, high frequency ammeter - read a DC value with the A/D converter, change ranges as I recently designed a piece of test equipment using a 16F690.

pbp3 warning 202

Hopefully this won't be posted twice - the first time was before I was fully registered.











Pbp3 warning 202