CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 15 matches
CCS Forum Index
Author Message
  Topic: Convert decimal to hex and then change the msb/lsb
iman_zahari

Replies: 8
Views: 16068

PostForum: General CCS C Discussion   Posted: Sun Oct 10, 2010 7:55 am   Subject: Convert decimal to hex and then change the msb/lsb
ADC values are neither decimal nor hexadecimal, they are just binary. Decimal or hexadecimal are printable reprentations of the binary value.

Exchanging MSB and LSB of a 16 bit value can be done in ...
  Topic: Convert decimal to hex and then change the msb/lsb
iman_zahari

Replies: 8
Views: 16068

PostForum: General CCS C Discussion   Posted: Sun Oct 10, 2010 5:31 am   Subject: Convert decimal to hex and then change the msb/lsb
ADC values are neither decimal nor hexadecimal, they are just binary. Decimal or hexadecimal are printable reprentations of the binary value.

Exchanging MSB and LSB of a 16 bit value can be done in ...
  Topic: Convert decimal to hex and then change the msb/lsb
iman_zahari

Replies: 8
Views: 16068

PostForum: General CCS C Discussion   Posted: Sun Oct 10, 2010 5:18 am   Subject: Convert decimal to hex and then change the msb/lsb
However there may be no point!.... Smile

I suspect the actual requirement, is to output the bytes in reverse order in hex, using printf/sprintf. In which case, just send the value as bytes with the or ...
  Topic: Convert decimal to hex and then change the msb/lsb
iman_zahari

Replies: 8
Views: 16068

PostForum: General CCS C Discussion   Posted: Sun Oct 10, 2010 2:33 am   Subject: Convert decimal to hex and then change the msb/lsb
Good day all,

I'm using 16f877a for voltage/current measurement. However, to feed it into modbus, I need to convert to hex and then change the position of the msb with lsb.

It is a 10 bit adc r ...
  Topic: 4n35 optoisolator for DC voltage measuring
iman_zahari

Replies: 12
Views: 17474

PostForum: General CCS C Discussion   Posted: Tue Sep 28, 2010 4:28 am   Subject: 4n35 optoisolator for DC voltage measuring
In a short, the said HCPL-7520 implements an amplifier and ADC on the primary side, a digital optocoupler and a DAC on the secondary, providing a considerably higher performance than analog solutions ...
  Topic: 4n35 optoisolator for DC voltage measuring
iman_zahari

Replies: 12
Views: 17474

PostForum: General CCS C Discussion   Posted: Tue Sep 28, 2010 4:25 am   Subject: 4n35 optoisolator for DC voltage measuring
As SherpaDoug and FVM have mentioned, it all depends on your application. I would look at ADI and TI for reference designs as they're very well versed companies in analog design. However, in keeping w ...
  Topic: 4n35 optoisolator for DC voltage measuring
iman_zahari

Replies: 12
Views: 17474

PostForum: General CCS C Discussion   Posted: Mon Sep 27, 2010 5:59 pm   Subject: 4n35 optoisolator for DC voltage measuring
Sherpa, I've been there! LOL. My last project involves using HCPL-7520, but in my place it is quite expensive at 11usd per piece. I need to use 8! Thought the 4n35 can replace the 7520.

Btw, what ...
  Topic: 4n35 optoisolator for DC voltage measuring
iman_zahari

Replies: 12
Views: 17474

PostForum: General CCS C Discussion   Posted: Mon Sep 27, 2010 3:03 pm   Subject: 4n35 optoisolator for DC voltage measuring
Ttelmah, is there any good suggestion to isolate my input voltage? What is the norm in isolating the input voltage for ADC to the PIC?
  Topic: 4n35 optoisolator for DC voltage measuring
iman_zahari

Replies: 12
Views: 17474

PostForum: General CCS C Discussion   Posted: Mon Sep 27, 2010 1:56 pm   Subject: 4n35 optoisolator for DC voltage measuring
I think I've mistakenly put the question there. When I increase the input voltage, the output voltage decreases. Is anything wrong my setting? It should be forward biased and proportional.

Regardi ...
  Topic: 4n35 optoisolator for DC voltage measuring
iman_zahari

Replies: 12
Views: 17474

PostForum: General CCS C Discussion   Posted: Mon Sep 27, 2010 1:33 pm   Subject: 4n35 optoisolator for DC voltage measuring
Hi all,

I've encountered a problem. I've tried to set the input current to the opto by using 5V and 600 ohm resistor, resulting less than 10mA input current. On the output side, I have put the volt ...
  Topic: Modbus implementation
iman_zahari

Replies: 86
Views: 111498

PostForum: General CCS C Discussion   Posted: Sat Jul 24, 2010 2:33 am   Subject: Modbus implementation
oo ok. i got it all now. tqvm FvM
  Topic: Modbus implementation
iman_zahari

Replies: 86
Views: 111498

PostForum: General CCS C Discussion   Posted: Fri Jul 23, 2010 1:23 am   Subject: Modbus implementation
All right. I got it. It is 5. I got confused by the buffer size. But if int8 coils = 0b00000101 is the number of length, then what int8 inputs = 0b00001001 is supposed to mean?
  Topic: Modbus implementation
iman_zahari

Replies: 86
Views: 111498

PostForum: General CCS C Discussion   Posted: Fri Jul 23, 2010 1:19 am   Subject: Modbus implementation
The length is the buffer size rite? Sorry but I'm not sure where to locate it.
  Topic: Modbus implementation
iman_zahari

Replies: 86
Views: 111498

PostForum: General CCS C Discussion   Posted: Wed Jul 21, 2010 12:50 am   Subject: Modbus implementation
I tried using modbusview. When I tried to force coil 01 to go high, the reply is high,

transmit:
[01] [05] [00] [FF] [00] [8C] [3A]

receive:
[01] [05] [00] [FF] [00] [8C] [3A]


So I guess ...
  Topic: Modbus implementation
iman_zahari

Replies: 86
Views: 111498

PostForum: General CCS C Discussion   Posted: Tue Jul 20, 2010 11:44 pm   Subject: Modbus implementation
Hey guys, in ex_modbus_slave.c , what does these means?

int8 coils = 0b00000101;
int8 inputs = 0b00001001;
int16 hold_regs[] = {0x8800,0x7700,0x6600,0x5500,0x4400,0x3300,0x2200,0x1100}; ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group