Hi All,
I'm playing with the HMC6532 pressure module. All works ok when I run both picaxe and the module at 3.3volts but, when I try to use a voltage level converter with the picaxe at 5v and the module at 3.3v, the results are very erratic. Someimes, it gives the correct reading but more often it gives either 1740 or 6553.
I've tried it with and without pull up resistors one one side and both sides with similar results. I've got two 0.1uF caps,. not shown on the drawings below.
Any suggestions would be appreciated!
edit: I've shown the voltages to the level converter the wrong way round on the drawing but I do have them the right way round..
3.3v to pins 1 and 8 and 5v to pin 14.
Thanks,
John.
I'm playing with the HMC6532 pressure module. All works ok when I run both picaxe and the module at 3.3volts but, when I try to use a voltage level converter with the picaxe at 5v and the module at 3.3v, the results are very erratic. Someimes, it gives the correct reading but more often it gives either 1740 or 6553.
I've tried it with and without pull up resistors one one side and both sides with similar results. I've got two 0.1uF caps,. not shown on the drawings below.
Code:
; HMC6352 compass module
init:
hsersetup B9600_4, %10000 ;Use LCD Pin 1, no hserin
hserout 0, (13) : pause 100 ;Initialize LCD
hserout 0, (13) : pause 100
hserout 0, (13) : pause 100
pause 500
hserout 0, ("ac1", 13) ;Clear display
pause 50
hserout 0, ("acc", 13) ;Hide cursor
i2cslave $42, i2cslow, i2cbyte ;Set HMC6352 device address
main:
i2cwrite ($41) ;'Get Data' command
pause 50
i2cread (b1,b0) ;Read in two bytes
hserout 0, ("ac80", 13) ;Position LCD cursor
hserout 0, ("adDeg: ", 13)
w0 = w0 / 10
hserout 0, ("ad", #w0, " ", 13)
pause 500
goto main
edit: I've shown the voltages to the level converter the wrong way round on the drawing but I do have them the right way round..
3.3v to pins 1 and 8 and 5v to pin 14.
Thanks,
John.
Attachments
-
18.2 KB Views: 34
-
30.8 KB Views: 33
Last edited: