Yes, the LATD.1 = 1 has to be set as there is no telling what state it was left in after the preceding OWOUT command.
Dave - 13th February 2019, 15:08won't statement HIGH DIGIT1(2) set HIGH the port number, stored in DIGIT1(2) ?
CuriousOne - 13th February 2019, 14:29Excellent!
now it works!
so it was latd/trisd issue as I guess...
Within PBP you can manually manipulate SFRs, read and write to UART registers, etc. If the PIC you are using has EEPROM, you can set up an array of sequential EEPROM addresses with SFR settings. It...
mpgmike - 12th February 2019, 16:34Try this routine:
OWOUT DQD, 1, [$CC, $44] ' Start temperature conversion
LATD.1=1 SET PIN STATE TO HIGH
TRISD.1 = 0 'MAKE PIN AN OUTPUT WITH DEFAULT STATE HIGH
pause 760 'ADD AN EXTRA 10...
CuriousOne, How many times are you letting the program cycle? Here is the output from my terminal after I reset the processor power. Notice the "85" as the first reading from the DS18B20-PAR. This...
Dave - 12th February 2019, 16:02YUP it wasn't OSCCONx per se, but you got me thinking and it WAS the Configuration Word Settings. I had (erroneously) assumed that by setting INTOSC at 32MHz, no other config word settings would be...
picster - 12th February 2019, 13:47Yes tried another one, same "85". There is no cables, sensor directly hooked on breadboard.
CuriousOne - 12th February 2019, 12:11Have you tried a different sensor. It could be that the current sensor is faulty as the code looks to be correct.
What's the cable length between the chip and the sensor. I have 18B20's in a...
Re: ADC input signal filter selection
I prefer the inductor on the +Vdd side.
Ioannis Yesterday, 22:05Anyway, I'd suggest get 10 or more samples in an array, then sort them in order and keep the middle 5 values.
Then add them together and divide by 5.
...