lpc 1768 gpio voltage problem help plz

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpc 1768 gpio voltage problem help plz

1,655 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anders_avr on Sat Feb 09 02:24:00 MST 2013
hi,im new to lpc1768,i work 5 years with atmel avr, i bought a lpc 1768 board from landtiger(china,why??we dont have the orginal board in our country!!).
i execute many program on it and work fine,but I2C!!!!!!!!!!
i read some post here maybe i have problem with gpio not i2c(i worked with cmsis and many i2c.h library available on the net,but it doesnt work, i debug it in keil it seems worke fine!!!,:mad: i write a simple blinky led,in other pins i have 3.3 volts with internal pullup and led is completely bright!! but in p0.27 and p0.28 (i2c port is 2.7 low light,low current with internal pullup)!! does it normal??
i test many simple program on i2c i test my program with ds1307 rtc why?simple if i configure correctly there is pin for led out that i figure out its ok or not.why am i test ds13207? i pulled up with 3.3k ,10k but.....!!
i have a modul RM-G146 9 axis gyro acc magnet it is 5 volt it worked fine with avr but in lpc?????:mad:,so i decide to write simple c code for ds1307 to debug my problem,i dont know my problem!!5 to 3.3 volt?? my program??? my hardware??
plz somebody help ,I'm confused!!!
0 Kudos
Reply
10 Replies

1,427 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anders_avr on Sat Feb 09 06:56:28 MST 2013
oh see:D

the dso is too expensive for me of course in my country,as i said before;
i know i must have one, but in $ money i must pay about 1500 -2000 $ and 1200$ for analog one(in my contry of course)!!!!!! :eek:may be i build one of them with avr or arm :D
its finished about 500$:rolleyes:
thanks
but im have to debug with other ways
0 Kudos
Reply

1,427 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Feb 09 06:09:24 MST 2013

Quote: anders_avr
...i work 5 years with atmel avr



:confused:

DSO is a 'must-have' :eek:

http://en.wikipedia.org/wiki/Digital_storage_oscilloscope

like

http://www.picotech.com/entry-level-oscilloscopes.html

which can serial decode things like UART / I2C, CAN :)
0 Kudos
Reply

1,427 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anders_avr on Sat Feb 09 05:59:07 MST 2013
thank u for your answer but i dont have scope,and what is the DSO??sorry im new to arm:(
0 Kudos
Reply

1,427 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anders_avr on Sat Feb 09 05:56:25 MST 2013
how can i run it on i2c1 port may be p0.27,28 was harmed???!!
:rolleyes:
0 Kudos
Reply

1,427 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Feb 09 05:55:35 MST 2013
#1 Scope your SCL/SDA lines. Even cheap DSOs are able to decode I2C ;)

#2 This is a LPCXpresso forum. Could be useful if you look for a working Code in Keil forum / samples: http://www.keil.com/forum/threads.asp :rolleyes:
0 Kudos
Reply

1,427 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anders_avr on Sat Feb 09 05:45:49 MST 2013
it doesnt work,im just confuse:mad: can i debug it with i2c bus in keil arm??
can i simulate ds1307 in keil?? realtime with my lpc??
i saw in some post but i doesnt understand,when i debug it it send 0x68 hex as device slave address and send 0xd0 again with not ack mark(!);how can i sure my software rootins are ok??even the proteus doesnt have lpc17xx:confused:
somebody HELP ME:confused:
0 Kudos
Reply

1,427 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anders_avr on Sat Feb 09 04:04:24 MST 2013
thanks :rolleyes:, i dont test the ds to 3.3,i used 5 volts as vcc,i changed the pinsel in my c (keil )before,
as u said,may be it works,i test it and say to u about 10 mins later,if it works i go to my rm-g146 modul with level shifter cuse it works just with 5 volts,by the way,thanks ,i test and say to u,:):rolleyes:
0 Kudos
Reply

1,427 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Feb 09 03:57:40 MST 2013
As your DS1307 datasheet describes, this chip is working with 3.3V I2C lines. This lines has to be pulled up (10k) to 3.3V (as usual)

Your software has to switch I2C to OC output. That's all :eek:

 LPC_SC->PCONP |= (1 << 7);

  /* set PIO0.27 and PIO0.28 to I2C0 SDA and SCL */
  /* function to 01 on both SDA and SCL. */
  LPC_PINCON->PINSEL1 &= ~((0x03<<22)|(0x03<<24));
  LPC_PINCON->PINSEL1 |= ((0x01<<22)|(0x01<<24));    
 
0 Kudos
Reply

1,427 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anders_avr on Sat Feb 09 03:32:32 MST 2013
yes i know how to convert 3.3 to 5 volts using two n channel mosfet level shifter
(AN97055),i used with and without level shifter but it doesnt work!:confused:
i just used ds1307 to debug software, i know lpc has rtc inside,other pins have 3.3 but i2c port has 2.7 low current!i read many posts on the net before and all of them said lpc 17xx is [B][FONT=Arial]
"5V tolerant I/O’s."
my lpc1768 is
http://www.eca.ir/products/dev-1768/
http://www.openmcu.com/?product-201.html
and has jlink debuger and programmer in the board.:)
[/FONT][/B][FONT=Arial][/FONT]
0 Kudos
Reply

1,427 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Feb 09 03:06:40 MST 2013

Quote: anders_avr
I'm confused!!!



I'm confused, too. You are working with a chinese board, Keil IDE with ? hardware and ?? software trying to connect a 5V Maxim RTC :confused:
Did you google already how to connect 5V I2C devices to 3.3V :confused:
0 Kudos
Reply