Bob, please post your code so that we can see what you are trying to do.
Bob, please post your code so that we can see what you are trying to do.
Here is the code. PIC16F870 by the way.
define OSC 20
define adc_bits 10
define adc_sampleus 50
trisa = 255
adcon0 = 129 'Internal clock, channel 0, switched on
adcon1 = 142 'Right justified (10 bit), channel 0 analog
adcin 0, temp
let temp1 = temp * 3
let temp2 = (temp * 5) / 100
let temp = temp1 + temp2
serout serial1, 2, ["A",#temp,"AA"]
This exact same program has been working fine for around 4 years. I have always had the same issue. If using the compiler with the popup window with progress bars the A/D does not work (same with many different chips, and projects) if using the other compiler everything was fine.
I have been using PBP for many years with micro code studio, and have always had the same issue. I no longer have a 32 bit operating system, so I can't even install my older version of PBP, and use the doss compiler. With PBP 3 I only have the option to use MPASMX or not, and both give the same result, the same result that I'v had since PBP 2.4ish.
Hi,
All defines are case sensitive, tryI didn't know PM (the "other" assembler, not compiler) wasn't case sensitive. Anyway, MPASM is so you have to be careful there.Code:define OSC 20 define ADC_BITS 10 define ADC_SAMPLEUS 50
Try it and see if that fixes it.
/Henrik.
EDIT: Why multiple threads with the same question?
Henrik,
Thank you very much, issue solved by changing to capital letters.
It's always the simplest things that cause the issues.
Sorry about the dual post, no one was viewing PBP 3 section, & my boss is pressuring me to get this done.
Regards
Bob.
Bookmarks