Hi again,
found the bug: the bus i am using is splitted in two 2 x 25cm long busses which is not the best solution. Sometimes because of layout reasons it must be done this way. In this case two 100...
Type: Posts; User: ralfmayr; Keyword(s):
Hi again,
found the bug: the bus i am using is splitted in two 2 x 25cm long busses which is not the best solution. Sometimes because of layout reasons it must be done this way. In this case two 100...
Hi all,
for info to all: I have the code from Aretti here on a 18F25K22, works fine with one slave on one master. When i connect more slaves (up to 31) i get the effect that a NACK comes right...
Hi Darrel,
yes you are right, i had 8.56, now 8.66 and it works.
BTW: For all I2C Slave progger:
To get the I2C Slave running on a 25K22, use SSP1_INT or SSP2_Int, and, very important, you must...
Hi Darrel,
i found a problem which is not clear to me:
I hava a 18(L)F25K22 and want to use SSP1_INT for my I2C handler, but after compiling the source, i get this error:
....test.asm 1052 :...
Hi,
thanks for the answer.
But: No effect. AN3 on this chip seems to be absolutely not useable.
Read the Errata Datasheet :-(
http://ww1.microchip.com/downloads/en/DeviceDoc/80437B.pdf
1. Module: ADC (Analog-to-Digital
Converter)
ADC conversion on AN3/OSC2 will have large INL
error up...
Hi all,
i have the following problem:
I use Aanalog 2 (RA2) and Analog 3 (RA4) to measure DC Voltage on a PIC18LF14K22.
The uP is configured to run with internal oscillator:
OSCCON =...
Yes i forgot the "]" in the post. I don't have the code here in the moment,
but i can say, it is done cyclic in 1 sec refreshtime, always calculated new and
then send out via serout2. It is not...
Hi,
i suggest using a logarhitmic power detector. For example the HMC600 series from Hittite, it delivers 19mV/dB in a range of 70dB. Or you must put an logarithmic amplifier behind your diode...
Hi all,
i have a counter from i = 0 to 31, every loop writes out with serout2 five
characters: serout2 tx_pin, 32, ["{W", data1(i), data2(i), "}".
So done, i observed the datapin with a logic...
Hi,
i had same problem, i do not calc in the write command:
a = B1.highbyte
b = B1.lowbyte
I2CWRITE sda, scl, add, loc, [a,b]
Ralf
Thank you both for the answers.
Now i understand.
So it seems always to be best to work with declaration 2 & 3 with
400 khz devices. This is what i found out yesterday.
Have nice eastern!...
Hello Al,
another question:
What are the three definitions:
1. DEFINE I2C_SLOW 1
2. DEFINE I2C_HOLD 1
3. DEFINE I2C_SCLOUT 1
do?
1. => Used with LO > 8MHz and 100kHz devices
2. => Time Delay...
Yep,
last year i made my first experiments with i2cslave,
but had no time to work on it for 8 months now as
i was very busy with other things.
Hope it will help others to come faster to their...
Some Remarks:
1. It is necessary to set the "DEFINE I2C_HOLD 1" in the master to get a
better behaviour of the timing. I checkrd it with the logic analyzer and it is
exactly like in the original...
Hi Al,
success!
The slave routine runs in a 18LF14K22.
I read back via i2c 20 values (a/d values and digital i/o) and i can set
several parameters with two bytes, 1st is array index, 2nd is...
Hi Al,
my mistake, it works now.
I made a mistake in calculating the address from four bits of a port :-(
This works:
main_loop:
...
i2caddress = (addr0 * 16) + (addr1 * 8) + (addr2 * 4) +...
There is an other problem with the i2cslave:
1. When the i2caddress is specifiead as constant (i2caddress CON $0F) it works perfect.
2. When bulding the address via a variable, it doesnt work:...
Silly question, i only have 3936 bytes in a 6722....
Hi Darrel,
great idea, i will test this.
BTW:
1. What is maximum size of an array (i use 18F6722)? I would need two array's
with a width of 10 bytes and a length of max 256!
2. The length of...
Is there a possibility to define 2 dimensional arrays in PBP, e.g. data(i,k) ?
Regards,
Ralf
Hi again,
did somebody test Al's code with a 18F14K22?
Regards,
Ralf
Hi all,
wanted to come back earlier with my experiences, but had too much work.
But :
I use Al's i2cslave in an 18F6722 I in an interrupthandler, in Al's code i made a little correction:
while...
Hi there,
short question: Why is MPASMWIN only a black Dos-Box when compiling after upgrading to PBP 2.60 and MPLAB 8.40?
Regards,
Ralf
The file was corrupt, don't know why. You could read it, you could edit it, but when compiling it, it was deleted! I copied all into a new file, than it worked! Nothing to do with long file names....