View previous topic :: View next topic |
Author |
Message |
HELL_FIRE_ Guest
|
|
Posted: Sun Dec 16, 2007 5:10 pm |
|
|
HI guys
With which one function I can replace BITEST function in CCS Compiler? I want to use compiler which did not support this function and to compile with him DS1624 driver code. Please help me |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Dec 16, 2007 5:40 pm |
|
|
Do you even have the CCS compiler ? CCS has had the bit_test()
function for years. But anyway, here is a bit_test() function:
Put these lines above the #include line for the ds1624 driver.
(Referring to the driver by jds-pic in the Code Library).
Code: | int8 const bitmask_table[] = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
#define bit_test(var, mybit) (!!(var & bitmask_table[mybit]))
|
|
|
|
CorosanD
Joined: 23 Jul 2007 Posts: 3
|
|
Posted: Wed Jan 02, 2008 10:30 am |
|
|
Thank you very much |
|
|
aloisjidra Guest
|
Re: DS1621 Stress |
Posted: Wed Mar 18, 2009 4:54 pm |
|
|
Hi
I would like to ask you to help with max 7500 thermo i2c sensor.
I could not find command for this sensor. I mean for example start conversion, read data and so
Thank for your answer
Best regards
Alois
Mark Weir wrote: | You may find that the problem comes back to the DS1621 device.
These have a tendency to lock up the I2C bus intermittently.
I have spent many hours chasing a similar problem recently using DS1621 and a 16F877A. The application would run perfectly for hours and then just lock up. I obtained some information from the Dallas Technical people stating known lock up issues with this device.
There are a number of other similar devices you could try, DS1631, DS1721, MAX7500. It depends on your requirements.
The only other thing is to check that nothing else is interfering with the bus traffic. Are there any AC devices in the area? it could be noise.
Cheers
Mark |
|
|
|
|