Jump to content

DAC

EstablishedMember
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About DAC

  • Rank
    Newbrie
  1. Work is progress!!! Have some patience please.
  2. The other problem can be that the TX an RX pins are connected in reverse. RB6 has to be connected to TXD RB7 has to be connected to RXD
  3. There is a chance that the software on the pc sends the bytes in reverse like this // txreg = 0x01; //11000000 dec 192 // txreg = 0x02; // 1100000 dec 96 // txreg = 0x03; //11100000 dec 224
  4. Believe that this standalone wizard (fransfrans wroth this one) has some basic code output wizard.zip Regards, David
  5. You can shift the bits 8 places like this. ////////////////////////////////////////////////// // From one 16bit variable two 8bit variables int Var16bit = 0xBCAC; // 0xBCAC == 48300 char Var8bit1; char Var8bit2; //Because Var8bit1 is an 8bit variable only 0xAC is left over. Var8bit1 = Var16bit; // AC == 172 // Shift the 8 bits 8 places (0x00BC) Var8bit2 = Var16bit>>8; // BC == 188 ////////////////////////////////////////////////// // From two 8bit variable one 16bit variable Var8bit1 = 0xAC; // AC == 172 Var8bit2 = 0xBC; // BC == 188 Var16bit = 0; Var16bit = Var8bit2*256+Var8bit1; // 0xBCAC == 48300 Regards, David
  6. Hi, The PCF8591 has a D/A converter that I’m trying to get to work but no luck is there anybody who has some example for the (I2c-> analog) Hardware/software?
×
×
  • Create New...