Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by touch

  1. Here's some code I wrote in a hurry to test out some alarm system modules I got on eBay... If memory serves me right they used some sort of PT2262 encoder (it seemed like a chinese knockoff clone) that generates a 16us sync code pulse and then uses Manchester encoding for the data.


    The code's pretty sloppy but it worked for what I was testing and I guess I used the "analog style" that jpnorair was talking about.

    #include <msp430g2553.h>
    #include <stdio.h>
    void startTimerA(void){       
    	TAR = 0;                                 
    	TACTL = TASSEL_2 + MC_2; 
    void stopTimerA(void){                                           
    	TACTL = TASSEL_2 + MC_0; 
    void main(void)
    	//Kill WDT and setup clocks
    	WDTCTL = WDTPW + WDTHOLD;         
    	BCSCTL1 = CALBC1_1MHZ;          
      	P1DIR |= 0x01; 
    	P1IES &= ~BIT4;                            // P1.4 Hi/lo edge
    	P1IFG &= ~BIT4;                           // P1.4 IFG cleared
    	P1IE |= BIT4;                             // P1.4 interrupt enabled
      	P1SEL = BIT1 + BIT2;             
     	P1SEL2 = BIT1 + BIT2; 
    	UCA0CTL1 |= UCSSEL_2;                  
    	UCA0BR0 = 104;                  
    	UCA0BR1 = 0;                             
    	UCA0MCTL = UCBRS0;                        
    	UCA0CTL1 &= ~UCSWRST; 
      _BIS_SR(LPM4_bits + GIE);                 // Enter LPM4 w/interrupt
    // Port 1 interrupt service routine
    #pragma vector=PORT1_VECTOR
    __interrupt void Port_1(void)
    	if(P1IFG & BIT4){
    		int sync = 0;
    		while((P1IN & BIT4)){}
    		while(!(P1IN & BIT4)){}
    		sync = TAR;
    		if(sync > 14500 && sync < 16700){
    			int j = 0;
    			char bitcnt = 7;
    			char byte = 0;
    			char data[3] = {0,0,0};
    			for(j=0; j < 24; j++){
    				int low = 0;
    				int high = 0;
    				while(P1IN & BIT4){}
    				high = TAR;
    				while(!(P1IN & BIT4)){}
    				low = TAR;
    			 	if(low > 1200 && high > 300){
    			 		data[byte] |= (0 << bitcnt);
    				else if(low > 300 && high > 1200){
    			 		data[byte] |= (1 << bitcnt);
    			 	}else {
    			 	if(bitcnt == 0){ bitcnt = 7;  byte++; }else{ bitcnt--; }
    		while (!(IFG2&UCA0TXIFG));
      		UCA0TXBUF = data[0];
      		while (!(IFG2&UCA0TXIFG));
      		UCA0TXBUF = data[1];
      		if(data[0] == 0xFD && data[1] == 0x4F){
      			P1OUT ^= 0x01; 
      		if(data[0] == 0xFF && data[1] == 0xF5){
      			P1OUT ^= 0x01; 
    		P1IFG &= ~0x10;
  2. I ordered some - hope they'll approve them. I've been using these STM32 Discovery dev boards for awhile and once you get a good tool-chain working, they're excellent development boards with a good set of peripherals, much more than the Stellaris has (DMA!), but they're quite a steep learning code from the simple stuff.

  3. I have to laugh at the concept of "decent wage". I lived on my own, rented an apartment and such, paid my bills and "got by" on minimum wage back in the late '80s. I also noticed that as minimum wage went up, so did rent, fuel, food and such... almost "lock-step": when minimum wage was raised, the cost of everything else went up leaving me in exactly the same position I was in before, despite the promises saying increasing minimum wage would put more money in my pocket. Years later, when my education and experience permitted me to earn more than minimum wage, I found myself in the odd position of having people "promoted" to making as much as I did due to increases in minimum wage: people making minimum wage got paid more and more while my wages didn't increase.

    While it's true raising the minimum wage does cause price increases, in the last few years the prices have increased drastically while the amount of money people are making has not. Adjusted for inflation people are making less now than they were in the 70's and yet many companies are having record profits (that go back to the investors) while they raise the price of goods and do not pay their employees anymore.

  4. Tried off a straight 5V USB AC adapter with a power-only cable and 5V straight to test points with a bench supply. No Joy.



    Are you soldering the launchpad with any ground/neutral connected to it?


    I ask because I've seen soldering guns that leak mains A/C onto the tip and if yours was doing this, it would surely blow the LP if the LP is grounded. If you want to test, just put a DMM lead on ground and another on the TIP of your soldering gun and see what you read. Highly unlikely this is the problem but you never know!

  5. You know half the problem with food-stamps are companies that wont pay a decent wage to their employees and play the law so they work their employees right under the limit to get benefits, for example Walmart employees more people that make just under the poverty level than any other company, so most of their employees can get food-stamps which are probably then spent at Walmart and we the taxpayers end up subsidizing Walmart.


    But to be honest, I don't see the need to why everyone points at food-stamps as if they are magically what will cure the economy if we take them away. Look at disability, it's basically another form of welfare, I know there are people that are disabled and should get it, but I also know people that get $1,500 a month because their ears ring and another that gets them because of headaches. Then you have social security and medicare which are costing billion to taxpayers because of fraud and waste.


    And then you have taxes, the rich can pay less in taxes than me because they have accountants that can play the books and investments that are taxed much lower than payroll taxes, then you have some people who pay no taxes at all! I think everyone should pay the same share of taxes.

  6. I've had a bit of experience with this, I worked on a project where we wrote and designed a custom storefront/inventory/shipping system. I would certainly look into label printers that can print customs/postage & flat rate envelopes & boxes. You probably already know this but if you plan on doing this software and organization is the key, its also not a bad idea to speak with a accountant/lawyer about opening a LLC or a C-Corp for it, that way you can get a Paypal, bank account, etc in the business name and don't have to use your personal accounts anymore and this simplifies tax related stuff as well.


    Hope you get it sorted out!

  7. You can find the example ASM code in here for the 2xx3 series MSP430's http://www.ti.com/lit/zip/slac485, ton's of other code examples here: http://www.ti.com/ls...430codeexamples


    I've been wanting to learn ASM myself, I have modified ASM code a few times and found it very easy to understand the gist of whats going on, much more so than looking at C/C++ code and trying to figure out whats happening.


    As to your question about grounds, I'm pretty sure as long as the circuit you're testing is not isolated any ground should work, be it the frame, battery or 12 outlet. I'm pretty sure stuff like the airbag is isolated though. You will need to filter the input to the uC/ADC as the DC on cars can have A/C noise due to bad rectifiers and the sort a lot of times.

  8. I'd love to be able to see all the forums in one and have one login across all 3 sites, while I am mainly interested in MSP430 stuff, I like to see the projects done on other platforms, as well as questions and answers asked over there, plus things such as General posts, For Sale, etc, are kinda duplicated across all 3 forums because they have a general subject matter.


    I also have another suggestion about the template, personally I'd much rather see the forums expand the page width to match the browser, rather than match the width of the header.


    I do believe IPB has a reputation system that's almost exactly like thanks.

  9. Hows the range on the modules? I only get like 25 feet max with these CC2500 modules. I've been trying to find a suitable PA/LNA to boost the signal a few dB. None of the manufacturers of them will send me samples though :(.


    I noticed you wanted to make a mailbox monitor.. I've made something similar using one of these: http://www.ebay.com/itm/Wireless-Door-Window-Magnet-Sensor-Detector-For-Alarm-System-433-MHz-/271033425757?pt=LH_DefaultDomain_0&hash=item3f1ad9df5d


    They use a PT2262 OOK encoder, I just used a receiver like this one http://www.ebay.com/itm/433Mhz-RF-transmitter-and-receiver-link-kit-for-Arduino-ARM-MCU-voltage-3v-12v-/300733295714?pt=LH_DefaultDomain_0&hash=item460519ec62 and did the decoding in software.


    One time lightning blew out the remote receiver for my garage door, damn thing cost $50, you made a nice one for a couple bucks, good work!


    I wish I documented my projects better myself, I don't really document anything so half the time I end up redoing stuff I've already done :oops:

  10. I was considering adding my own LED's for the DP's on things where I needed them. It's easy enough to solder to the chip, just lightly sand the epoxy off of the chip legs, drill a hole where the DP is and stickin a 0402 LED with some enameled wire connecting it to the driver chip.


    Can you tell if there are any traces in the way of doing this?

  • Create New...