Académique Documents
Professionnel Documents
Culture Documents
Si vous avez une question connexe, veuillez cliquer sur le bouton " Poser une question connexe " dans le
coin supérieur droit. La question nouvellement créée sera automatiquement liée à cette question.
Vues: 5459
Salut,
#include <msp430.h>
/*
* main.c
*/
taille du caractère signé;
char non signé * dataReceive;
unsigned char * dataTransmit;
le code est bloqué dans cette ligne: while (UCB0STAT & UCBBUSY);
ce qui signifie que le bit UCBBUSY est élevé.
mais quand j'omets une des lignes P1SEL le code ne bloque pas (le bit UCBBUSY est bas)
3. comment calcule la vitesse de communication smclk? j'ai cherché, mais je n'ai rien trouvé.
Je vous remercie.
MISE À JOUR:
bleu - vcc
orange - gnd
jaune -scl
violet - sda
Joe Shoshana
33 Réponses
Clemens Ladisch
Joe Shoshana
Clemens Ladisch
En réponse à Joe Shoshana :
Joe Shoshana
Clemens Ladisch
Can you measure the SDA/SCL lines with an oscilloscope or logic analyzer? Or at least a multimeter?
Joe Shoshana
I don't know why UCBBUSY is set; in theory, this should not be possible directly after the reset.
Joe Shoshana
Hi,
After you said you don't know why UCBBUSY is set, i assumed something wrong with the launchpad so i took another
and suddnely it's not busy anymore and it looks like it's working but, i don't see the characters on the lcd.
what do i need to investigate to see the results?
Clemens Ladisch
This sounds as if the SCL pin of the old LaunchPad is broken. Probably overvoltage (the nominal upper limit is 3.3 V) or
ESD.
I doubt that you can simply send characters over I²C. Is there any documentation about the I²C protocol?
Joe Shoshana
In reply to Clemens Ladisch:
yes, i have documentation for i2c protocol on the following link: www.nxp.com/.../PCF8574.pdf
the PCF8574 is the chip for the lcd's i2c controller(YWrobot)
another thing i notice, the SCL line controls the rythm of the data transfer, so the voltage on it is changing (high to low,
low to high) but i see that is always hi, i mean getting 3.7V everytime. i assume it needs to be ~2.5V (making an average)
does it make any sense?