I think, this Define changes nothing ! The LFSR isn't used in several PIC18F I used...
Type: Posts; User: BigWumpus; Keyword(s):
I think, this Define changes nothing ! The LFSR isn't used in several PIC18F I used...
ADCIN doesn't work on PIC18Fxx31.
Look here:
http://www.picbasic.co.uk/forum/showthread.php?t=13644&p=96903#post96903
Today I trapped into the same hole...
ADCIN doesn't work on a PIC18Fxx31.
I have just written some code to read AN0..AN7 on devices who have this inputs.
Init-Part:
;ADC
S*it
to late - to much wine
Yes - that is know, the tiny 16Fs doesn't have so big tasks to do ... ;-)
No - the datasheet uses a bra $-2 too and Picbasic compiles:
000C12 0003 M loop sleep
000C14 D7FE ...
Does this build a loop, or is there a "heavy load" of data in the code ?
I work with PBP 2.50C.
I've done some own work, but it is not tested:
asm
ClearMem macro Array,Size ;Macro um Speicher zu löschen
lfsr 0,Array
movlw Size
clrf POSTINC0
...
I'm just coding a PIC18F-projekt and there is the need to clear some Arrays or so...
What's about a ClearMem-command (or macro), because it is smarter then a "FOR I=0 to 15:Array[I]=0:Next...
Forget all this TTL-things !
You are in the CMOS-decade !!!!
No one is using TTL-Logic !!!!
Just look in the datasheet and look at the functions of each post-pin !! there is a lot of surprise...
If you are looking for costs ... forget all this old 16F... or 18F...-devices.
Take new cheap dsPic33 or ...J... or ...K... -devices.
The new devices are very cheap, the old stuff is expensive...
I can't see any 100nF-Cs round your PIC - is he resetting ? You can use a portpin to see it!
Maybe it will better the AD-Converter by filtering his AVDD via 56 Ohm and 100nF against ground, but this...
Use an ICL7667 to drive the piezo with 12V in a full-bridge ! It's like using 24V out of a pin against Gnd.
Why are you screaming so loud here ?????
The 877a has options and registers not know by the 877 (without a).
So, switch to the right compiler-option or read the datasheet so declare the register...
Ähhh....
What's about the DIV32-command ?
I think, it won't work:
(ECHO - MIN) / (MAX - MIN) will be between 0 and 1 and will be truncated to 0.
Try:
ZW VAR WORD
ZW=MAX-MIN:RESULT= (ECHO-MIN)*1000:RESULT=DIV32 ZW
That will...
Which port should this be ???????
I think you have to change the file 18F4550.BAS in the PBP-path:
'****************************************************************
'* 18F4550.BAS ...
Change ADCON2 to use more Acquisition time,
Wait after switching the ADC on (ADCON0) 1
delete this ADC-defines !
maybe ... ad a 1nF C to AN1 against ground
Try this:
I2C_Slave: ' I2C slave subroutine
IF R_W Then
I2C_Read: ' I2C read data from us ' THIS SECTION IS WORKING!
IF !d_a Then txbufferindex =...
-------------------------deleted-------------------------
You don't empty the SSPBUF after receiving the adress and the first data-byte gives you an buffer-overrun.....
What ?
It's PBP !
Again ... post your code !
I has gone through this hell too.
I bought a cheap LA (Po.Scope) in order to debug my code. I was looking for errors in PBP too, but at least the error was im my code (and maybe in PBP)...
...
You have to set the CKP-bit even after a WRITE-operation.
Try to disable the HSEROUT-lines.
Maybe this command will alter the TRISC-register, which will kill the I2C-engine.
Sometime, you should...