This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

interfacing a P89C668 microcontroler with a anybus compactcom module

Hello

I'm making a career end project, and i've got to make a succesfull communication between the philips p89c668 microcontroller (8kb xram, 64 kb rom) and an anybus compactcom module to get fieldbus communication between a master and the microcontroller.

With the anybus compactcom module was shipped a generic driver.

My intention is to fit the driver in the host program in order to achieve the communication, but i've got some problems to do this:

1.- the fieldbuses can manage 64 bit data like double longs, double floats... can the uvision manage them? wich typedefs can i use?

2.- if anybody had done a similar implementation, can i have a watch over this?

Thank a lot for your attention, and excuse for my poor english. I can be weird, but I think that it is readable and can be understood.

Parents
  • With the exception of add and subtract, the code to operate on larger numbers than is natively available is often simpler if you work with sign+magnitude, instead of working with two-complement numbers.

    In two-complement form, you often have to negate one or both of the numbers, before they may be used in evaluations.

    An example: A multiply of a number with -2 would require you to multiply the number with 0b1111...1110 in two-complement form. If you just start to multiply, you would get a huge number, before reaching the sign bit and "collapsing" the result. To avoid this, you would first have to detect the sign and negate the value -2 before starting the multiply.

    If performing the multiply using sign+magnitude, you would just multiply your number with 0b10 and then set the final sign to the xor of the two original sign bits.

Reply
  • With the exception of add and subtract, the code to operate on larger numbers than is natively available is often simpler if you work with sign+magnitude, instead of working with two-complement numbers.

    In two-complement form, you often have to negate one or both of the numbers, before they may be used in evaluations.

    An example: A multiply of a number with -2 would require you to multiply the number with 0b1111...1110 in two-complement form. If you just start to multiply, you would get a huge number, before reaching the sign bit and "collapsing" the result. To avoid this, you would first have to detect the sign and negate the value -2 before starting the multiply.

    If performing the multiply using sign+magnitude, you would just multiply your number with 0b10 and then set the final sign to the xor of the two original sign bits.

Children
  • With the exception of add and subtract, the code to operate on larger numbers than is natively available is often simpler if you work with sign+magnitude, instead of working with two-complement numbers.

    I think that i will use sign+magnitude. It doesn't matter a lot, because as i posted before, I don't need to make arithmetic operation. So i can use also one-complement or two-complement.

    Thanks a lot for your attention.