Jump to content
43oh

touch

Members
  • Content Count

    107
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by touch

  1. Here is some code I put together for reading the temp from a DS1281+ Sensor and outputting it over serial. You will need to flash the missing 16Mhz DCO values to use this, as explained here: viewtopic.php?f=10&p=2954#p2954 #include #define UART_TXD 0x02 // TXD on P1.1 (Timer0_A.OUT0) #define UART_RXD 0x04 // RXD on P1.2 (Timer0_A.CCI1A) #define UART_TBIT_DIV_2 (16000000 / (9600 * 2)) #define UART_TBIT (16000000 / 9600) #define delayMicroseconds(n) __delay_cycles(n<<4) void OneWireOutByte(int _1W_Pin, char d); char OneWireInByte(int _1W_Pin);
  2. That's great zeke. I went ahead and followed your instructions and flashed the new DCO values and have got the sensor working. Temperature readout is working perfectly via UART. I'll post the updated code soon, as the new code does not use MSPhere, and I've tried to clean it up some. Thanks a bunch!
  3. AH! I had read over your blog but totally missed that you had paralleled the photo diodes. I added another and replaced the resistor with a 10kohm one and I can now detect a remote at 1.5-2 feet! I'm using this code: #include void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR = 0x01; // P1.0 output, else input P1OUT = 0x10; // P1.4 set, else reset P1IE |= 0x10; // P1.4 interrupt enabled P1IES |= 0x10; // P1.4 Hi/lo edge P1IFG &
  4. I have the exact same power meter as you and was working on something very similar to what youre doing. I have some QSE973 photo diodes, and I'm able to detect the signal from a TV remote up to about 6-8 inch's away and have that signal trigger a interrupt, but I cant get it to work when I put it on the meter (even when its dark out). When I compared looking at the meter IR emitter to the one in my TV remote, the TV remote was multiple times brighter than whats in the meter. From what I've been reading most IR sensors need an amplifier of some sorts, would an opamp work for this? I fou
  5. Thanks to everyone that looked into it, I had a feeling that it was a timing issue but as I don't have a scope, it's kind of difficult for me to debug. I did try adjusting the wait times according to what zeke had found, but I had no luck. If anyone wants to have a stab at it, you can get free samples @ maxim-ic.com for testing, if you have a university or "non free" email: http://www.maxim-ic.com/datasheet/index ... /2794/t/or Sort of OT, but I've also been wondering something, I don't totally understand how timers work (I'm pretty new to micro controller programming.), would it be po
  6. MSPhere provides the main()->msphere.c void main() { init(); setup(); for (; loop(); } I have no trouble compiling or running, and in fact it seems to be sort of working because If i unplug the sensor I start to get 0's printed out on my terminal, but when It's plugged in I only get FF printed.
  7. Hello all, I'm trying to read the temperature from a DS1821+ 1 wire temperature sensor, I have had luck making it work on my Arduino but have been unable thus far to get anything other than "FF" in hex printed out over serial on my MSP430G2231 w/ my launchpad. I'm using MSPhere to provide the digitalread, digitalwrite, and pinmode functions. I've based my code off of this Arduino example: http://sheepdogguides.com/arduino/ar3ne1tt.htm, however, that code is for the DS1820 which is a little bit different, so I had to make some changes to my code to make it work with the DS1821+ on the A
×
×
  • Create New...