View previous topic :: View next topic |
Author |
Message |
Ismail
Joined: 15 Mar 2012 Posts: 6
|
problem |
Posted: Wed Apr 04, 2012 9:19 am |
|
|
Last edited by Ismail on Thu Apr 12, 2012 2:21 pm; edited 2 times in total |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1349
|
|
Posted: Wed Apr 04, 2012 11:12 am |
|
|
If you want help here, please take some time to look over this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=26245
Particularly point 4, but also 5 and 10 for when you post code for us.
You haven't given us much to go on to help with so we won't be able to help much at all. You need to give us clear descriptions of the problem, post the code, etc.
If you search for *MAX5821* you will see another thread with some code in it, though I don't know if it is working. |
|
|
Ismail
Joined: 15 Mar 2012 Posts: 6
|
|
Posted: Sat Apr 07, 2012 3:47 pm |
|
|
Last edited by Ismail on Thu Apr 12, 2012 2:13 pm; edited 1 time in total |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Apr 07, 2012 4:40 pm |
|
|
Quote: | i2c_write(0111000); //the adress of MAX5821
|
Please read this post regarding number formats in C:
http://www.ccsinfo.com/forum/viewtopic.php?t=47355&start=5
And read the other comments about i2c_poll, NACK on last read, etc.
Quote: | c=gets();
d=gets();
|
gets() is used to get an ASCII string, not a binary integer.
Look at the get_hex() or get_int() functions in the input.c driver file:
Quote: | c:\program files\picc\drivers\input.c |
|
|
|
|