Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:45 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : UBW32 WITH I2C COMMS

Author Message
ratsac
Newbie

Joined: 19/12/2011
Location: Australia
Posts: 8
Posted: 04:42am 27 Feb 2012
Copy link to clipboard 
Print this post

I AM HAVING NIL RESULTS WHEN USING UBW32 INSTEAD OF MY MAXIMITE
I AM USING OUTPUT TAGS 12 AND 13, ON UBW32 BOARD THEY ARE D9 AND D10 RESPECTIVELY
THE SAME PROGRAM AS IN THE MAXIMITE LISTED BELOW
5 DIM PORT
10 I2CEN 100,100
20 I2CSEND 32,0,1,&hff
30 ? "MM.I2C after send: "; MM.I2C
40 I2CRCV 32,0,1,port
50 ? "MM.I2C after recv: "; MM.I2C;", Data from port: ";HEX$(port)
60 I2CDIS
70 END

THE RESULTS ARE
MM.I2C after send: 2
MM.I2C after recv: 2 , Data from port: 0

WHICH IS THE SAME AS NIL CONNECTION
HAVE TESTED O/P 12 TO SDA AND O/P 13 TO SCL

THANKS
SAC
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 06:50am 27 Feb 2012
Copy link to clipboard 
Print this post

silly questions but ....

power on the I/O board?
on the right UBW32 pins?
right cables on the right pins?
do you still have the pullup resistors in circuit?

declare a pin as counting input and couple the sda and scl pins to it one by one to test if you are getting pulses on the line. You should be able to approximately predict the count. slow the I2C speed down to do the counting. dont forget the resistorsEdited by BobD 2012-02-28
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 04:13pm 27 Feb 2012
Copy link to clipboard 
Print this post

Hi ,

Cool to see that I'm not the only one who cant achieve to made a I2C communication
with the UBW32.
I'm 100% sure that all pin used are working because i have use them to
connect my joystick who work perfect
After trying with 3 different nunchuk and with no result i just keep that
on side up it work
I tested the SDA/SCL pins on the oscilloscope and no signals are coming out.
The 2 pins have a resistor to 3.3v as pull-up , i tried from 2.7 to 10K.
It will be good if it work , so all next games can use nunchuk instead of a
buttons based joystick.

Cheers.


Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3800
Posted: 05:56pm 27 Feb 2012
Copy link to clipboard 
Print this post

Could it be to do with the different chip used by the UBW32? It uses the ...512L not ...512H, so 100-pin not 64-pin. Maybe some pins change function or need initialising differently?

John
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 05:01am 28 Feb 2012
Copy link to clipboard 
Print this post

Nah , i check the PIC32MX795F512L data-sheet for the pins , they are correct.

Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3800
Posted: 10:08am 28 Feb 2012
Copy link to clipboard 
Print this post

Yes, but what I meant was along these lines:

Oh, I'm working on the basis that SDA & SCL are SDA1 & SCL1.

On the 100-pin 512L these are pins 67 & 66. Those are shared with other device features such as INT4 & INT3, RA15 & RA14. On the 512H the sharing is different and I wondered if that might be related to the problem.

John
 
ratsac
Newbie

Joined: 19/12/2011
Location: Australia
Posts: 8
Posted: 04:59am 19 Mar 2012
Copy link to clipboard 
Print this post

I have resolved thjs problem with the use of different pins as indicated by johns

I used ra15 for sda and ra15 for sdl this enabled a result

Have emailed geof with this result

ratsac
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024