I think it is better to upload what is in my mind.
Type: Posts; User: FromTheCockpit; Keyword(s):
I think it is better to upload what is in my mind.
I want to confirm if one pin can be an input and later when needed can be made an output and high/low as needed?
It's just that when an input, it will have 2.5 volt on it through a voltage divider...
If I have a statement like below:
I2C_Routine:
I2CWRITE SDA,SCL,$36,[Loc], Fail
Return
The jump to the label Fail is executed as a Goto or a GoSub instruction at the end of the above...
Success but with one question.
Finally, I put 20MHz clock. It started working with absolutely no problems.
This leaves me with one MAJOR question - Is there any way, I can run the whole show at...
I just discovered, that the I am actually receiving only 1 byte as expected. Rest are just "Start......"13,10 and "Done",13,10. Yesterday got too exhausted and missed this mistake of mine.
Here is...
Did the above, no luck.
Doesn't like it straight, giving it $37/$36 direct sends it to Fail1 routine. So write statement fails.
Funny thing is that when it goes to Fail1, though there should be...
The manual says do not use constants for address.
Though I tried the above but the result is the same.
While 1 : Wend - I just put this just like that to halt the code.
Still getting the same with the following code:
Value Var BYTE
Addr Var byte
Loc Var Byte
'---------------------------------------------------------
Pause 500
DEBUG "Start......",13,10...
Better in nibble setting. I can see '2E' repeated a few times.
Have a look at my real term serial monitor. I am actually getting a lot of unexpected data which I don't understand how is getting stored in just one byte. Though among all this, I can see '2E' (but...
I did exactly the same as above and the sequence completed fine. BUT the values are not consistent with the datasheet, I should get '$2E' from location 0, but WHATEVER location I try to read, I am...
Fails on the second statement if I swap the values of Addr. i.e. First $37, second Addr $36. First one goes fine.
Checked it. It fails on the first write statement.
How do I implement this, like this below?
Main:
High Led : Pause 500: Low Led : PAUSE 500
Addr=$36
I2CWRITE SDA,SCL,ADDR,LOC
Addr=$37 : pause 10 ' OR If SDA=1 then main ...
I read it again to confirm this, the attachment is my source. It also mentions 9 bits long address. Not sure who sends an ack. I see that in read statement the device send ack, so why add it to the...
Picked up from the datasheet of the device. That is what I understood, am I wrong?
Though I did tried $3B & $5B.
OSCCON changed to set 4MHz, internal oscillator.
I2CSLOW 1 stays commented
I2CHOLD 1 stays commented
LED Var PortC.0
Value Var Byte
Addr Var Byte
Loc Var Byte...
Tried this:
Pause 500
DEBUG "Start......",13,10
Value=0
Addr=$9B
Loc=0
Main:
Steps Taken:
1) Configuration changed: _INTRC_OSC_NOCLKOUT
2) Made 16f688 run at 8MHz : OSCCON=%01110001
3) Commented DEFINE I2CSLOW 1
4) Value changed to BYte (then to word again)
I get a...
I added two bytes - Addr & Loc
Addr=$1B
Loc=0
Sent - I2CREAD SDA,SCL,Addr,Loc,[Value],Fail
No Luck :(
'-----------
What is also confusing me is the control byte in the manual, the device...
My Code is this:
PortC.2 keeps toggling along with normal LED.
I have also attached the device datasheet. I really appreciate the help in this.
Yes, pull ups are there @ 3.2k.
I tried the statement : I2CREAD SDA,SCL,$1B,0,[VALUE] (is it correct? because I don't had any luck)
I am trying to communicate with an I2C device. I have done almost everything I could think of but it is not working. The manual mentions stuff but not exactly matching with the datasheet of the...
Thanks M8. Got one more for you.
I have 4 slaves, lets say they all have RJ45 type connector (for easy application). So one wire comes out from them, 4 in total.
How does one master connects...
Do these RS485 cables connect to RJ45 connectors? (I am sorry this is my first time with them)