Would be lovely! I sure hope it's a small detail we're overlookingbut if I can i would try to put a photo of whow I´ve got the connections.........
DS1307 Sparkfun I2C
#21
Posted 15 July 2011 - 11:39 AM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#22
Posted 15 July 2011 - 11:41 AM
namespace I2C_RTC { public class Program { public static void Main() { byte[] buffer_read = new byte[7]; byte[] buffer_write = new byte[1]; I2CDevice.Configuration config = new I2CDevice.Configuration(0x68, 100); I2CDevice RTC = new I2CDevice(config); buffer_write[0] = 0x00; I2CDevice.I2CReadTransaction tran_read = I2CDevice.CreateReadTransaction(buffer_read); I2CDevice.I2CWriteTransaction tran_write = I2CDevice.CreateWriteTransaction(buffer_write); I2CDevice.I2CTransaction[] tran = new I2CDevice.I2CTransaction[]{tran_write}; int data = RTC.Execute(tran, 100); Debug.Print("\nThe number of data transfered is: "+ data.ToString()); tran = new I2CDevice.I2CTransaction[] { tran_read }; data = RTC.Execute(tran, 100); Debug.Print("\nThe number of data transfered is: " + data.ToString()); } }
I tried to do it with the call of Write and Read together in the same .Execute but it works the same, wrong jejejejejej
#23
Posted 15 July 2011 - 11:43 AM
Yes, I connected everithing well again......thank you very much for wasting your time with my problem, shure that the problem it´s a little detail(a dumb detail shure) but if I can i would try to put a photo of whow I´ve got the connections.........
You are not wasting our time i assure you. The success of a good community is mutual help. No problem is dumb, its all down to experience (I am not an expert in electronics at all, im a coder)
No question, big or small is a dumb question. The most intelligent thing people can do when unsure is to ask
P.S. Did you see my code example i posted on the previous page (hate pages ) the attached library/wrapper may well prove useful.
#24
Posted 15 July 2011 - 03:19 PM
Attached Files
#25
Posted 15 July 2011 - 04:25 PM
OK, the code i used is the one that it´s at the biginnig but i would put it again :
namespace I2C_RTC { public class Program { public static void Main() { byte[] buffer_read = new byte[7]; byte[] buffer_write = new byte[1]; I2CDevice.Configuration config = new I2CDevice.Configuration(0x68, 100); I2CDevice RTC = new I2CDevice(config); buffer_write[0] = 0x00; I2CDevice.I2CReadTransaction tran_read = I2CDevice.CreateReadTransaction(buffer_read); I2CDevice.I2CWriteTransaction tran_write = I2CDevice.CreateWriteTransaction(buffer_write); I2CDevice.I2CTransaction[] tran = new I2CDevice.I2CTransaction[]{tran_write}; int data = RTC.Execute(tran, 100); Debug.Print("\nThe number of data transfered is: "+ data.ToString()); tran = new I2CDevice.I2CTransaction[] { tran_read }; data = RTC.Execute(tran, 100); Debug.Print("\nThe number of data transfered is: " + data.ToString()); } }
I tried to do it with the call of Write and Read together in the same .Execute but it works the same, wrong jejejejejej
With that exact code (and an additional closing bracket, one is missing), I got:
The number of data transfered is: 1
The number of data transfered is: 7
The thread '<No Name>' (0x1) has exited with code 0 (0x0).
So your code looks OK. I just got my board connected like the wiki page I posted previously.
Firmware: 4.2 beta 2
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#26
Posted 16 July 2011 - 01:10 PM
Attached Files
#27
Posted 16 July 2011 - 01:23 PM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#28
Posted 17 July 2011 - 09:55 AM
#29
Posted 18 July 2011 - 06:37 AM
#30
Posted 18 July 2011 - 06:43 AM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#31
Posted 19 July 2011 - 07:46 AM
#32
Posted 19 July 2011 - 08:57 AM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#33
Posted 22 July 2011 - 07:39 AM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#34
Posted 07 November 2011 - 10:45 PM
Hi gomore11,
Glad I could be of help. Pullups are indeed required, but they are required on an arduino as well I suppose. Enjoy your time-aware Netduino!
A bit of frustration here as the pullups were not needed on my arduino but refused to work on the netduino. A couple of 2k2s and all is peachy.
Thanks for jogging the memory
Take a seat, I'll be right with you.
#35
Posted 07 November 2011 - 11:37 PM
-- H.L. Mencken, "What I Believe"
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users