
OCY
-
Content Count
67 -
Joined
-
Last visited
-
Days Won
2
Reputation Activity
-
OCY got a reaction from JMLB in pins needed for programing
Vcc, Vss, plus the two SBW pins (RST & TEST).
-
OCY got a reaction from zeke in 3-Pin MSP430?
3-pin? No. But 4 pins is possible. Vcc, Vss, RST, and TEST are needed to program the Flash.
After programming the Flash, you could cut RST and TEST too and get a 2-pin "functional" chip!
The "function" is to sense Vcc and Temperature and transmit them to a near by radio.
I did that without connecting anything to any Port Pins. But I have not tried actually cutting off those pins,
-
OCY got a reaction from thenutbunny in Advice about a water temperature controller
Hello,
I think you should consider a SCR or some kind of solid-state switch instead of a electromechanical relay. Do you have data for life expectancy of such a device if you make-and-break at the rate of once per second?
-- OCY
-
OCY got a reaction from dmf in Reading multiple digital inputs
How are the dip switches connected? Each between a P1 pin and ground? Are there pull-up resistors? If not, you could use the on-chip P1REN and P1OUT to pull them up.
Depend on pull-up, R, and the parasitic capacitance, C, you may also need to delay ~2*R*C after power up before you read the input.
-
OCY got a reaction from RobG in Sensing DC current- HELP
I know 99-cent stores often have toy compass. If you hold it near a wire that carries 100A, the needle sure will tilt. You just need to label "North" as "Charging" and give some good instructions of how to use it.
-
OCY got a reaction from bluehash in Jajajaja-Ta
GeekDoc,
Thank you for pointing that out.
So here is the file ACOAC.zip (It has nothing to do with acetic anhydride.)
--OCY
-
OCY got a reaction from jsolarski in 2 MSP430 sharing one USB UART?
I do not see any problem.
RXD signals for both the MSP430s can be connected together and driven by the USB interface.
TXD signals from the MSP430s could use serial resistors and then connect together to drive the USB interface. This is to prevent contention despite of the fact that only one of the MSP430s should drive it at any given time (the other one should switch to DIR=0 and ignore the input).
-
OCY got a reaction from GeekDoc in Timer_A2 in '2231 Datasheet?
The pin assignments are different on different packages of the same chip. See the "Device Pinout" near the beginning of the data-sheet. PW, N, and RSA are package names.
-
OCY got a reaction from bluehash in Timer_A2 in '2231 Datasheet?
The pin assignments are different on different packages of the same chip. See the "Device Pinout" near the beginning of the data-sheet. PW, N, and RSA are package names.
-
OCY got a reaction from RobG in Are MSP430 wake up times clock source dependent?
It depends on how "deep" is the sleep.
If only the CPUOFF is set, it only takes n cycle of MCLK to start the CUP.
If the source of MCLK is off, extra time is needed to start up that clock.
If DCO is off but its current source is on, it only takes a few usecs.
If the current source is off, extra usecs are needed.
-
OCY got a reaction from frozencarbonite in Are MSP430 wake up times clock source dependent?
It depends on how "deep" is the sleep.
If only the CPUOFF is set, it only takes n cycle of MCLK to start the CUP.
If the source of MCLK is off, extra time is needed to start up that clock.
If DCO is off but its current source is on, it only takes a few usecs.
If the current source is off, extra usecs are needed.
-
OCY got a reaction from NJC in Are MSP430 wake up times clock source dependent?
It depends on how "deep" is the sleep.
If only the CPUOFF is set, it only takes n cycle of MCLK to start the CUP.
If the source of MCLK is off, extra time is needed to start up that clock.
If DCO is off but its current source is on, it only takes a few usecs.
If the current source is off, extra usecs are needed.
-
OCY got a reaction from GeekDoc in Where's the Simulator?
The IAR KickStart has simulator for all MSP430, including G2xx1 and G2xx2.
-
OCY got a reaction from sucotronic in Wrong calibrated DCO or wrong code?
Why did you use "|=" to modify DCOCTL and BCSCTL1 registers? You should have used "=" to set them.
Your chip is clocking at ~1.64MHz (1640000Hz). The WDT divide it by 512. So you get:
1640000/512 = 3200 interrupts per second.
-
OCY got a reaction from RobG in LaunchPad as Sony IR Remote
Very good work.
I have some small suggestions.
You do not need to use P1.0 to modulate the 38 kHz sub-carrier with hardware (D2, D3, and R1). You could clear BIT4 of P1OUT and set/clear BIT4 of P1SEL to turn on/off the sub-carrier at P1.4. Connect P1.4 directly to the base of the transistor T1 and move R2 and D1 from the collector side to the emitter side of T1.
Also, you do not need R3, R4, and R5. You could set BIT1, BIT2, and BIT3 of P1REN instead.
With these small changes in firmware and some re-wiring , you freed one port pin and saved four resistors and two diodes.
-
OCY got a reaction from gatesphere in New MSP430G2xxx Value Line chips?
a) Do these chips have BSL ROM? The current G2xx1 do not have BSL ROM.
Are the link command files for these chips in the newest CCS? If so, they should show the size of RAM and Flash.
-
OCY got a reaction from gatesphere in Receive only uart?
I wrote 4 little procedures. You can cut them down easily. For example, you may not need "set_baud" nor "auto_baud". And you may only need "getchar" or "putchar".
/******************************************************************************* * Sub-Standard I/O for LaunchPad Board * * OCY Nov 2010 * *******************************************************************************/ #include #define RXD BIT2 #define TXD BIT1 int baud_divider = 104; /* default for 9600 b/s @ SMCLK = 1 MHz */ //============================================================================== int set_baud ( int i ) { baud_divider = i; return (i); } //============================================================================== int auto_baud ( void ) { __no_init int zero; P1SEL |= RXD; TACCTL0 = 0; TACCTL1 = CM_2 | SCS | CAP; TACTL = TASSEL_2 | MC_2 | TACLR; while ((TACCTL1 & CCIFG) == 0) {/* wait */} zero = TACCR1; TACCTL1 = CM_1 | SCS | CAP; while ((TACCTL1 & CCIFG) == 0) {/* wait */} P1SEL &= ~RXD; TACTL = 0; return (baud_divider = TACCR1 - zero); } //============================================================================== int putchar ( int i ) { TACCR0 = 0; TACCTL0 = OUT; TACCTL1 = 0; P1SEL |= TXD; P1DIR |= TXD; TACTL = TASSEL_2 | MC_2 | TACLR; i = (i + 0x100) << 1; do { TACCR0 += baud_divider; if (i & 1) TACCTL0 = OUTMOD_1; else TACCTL0 = OUTMOD_5; while ((TACCTL0 & CCIFG) == 0) {/* wait */} } while ((i = (i >> 1)) != 0); P1DIR &= ~TXD; P1SEL &= ~TXD; TACTL = 0; return 1; }//============================================================================= int getchar ( void ) { int byte = 0; P1SEL |= RXD; TACCTL0 = 0; TACCTL1 = CM_2 | SCS | CAP; TACTL = TASSEL_2 | MC_2 | TACLR; while ((TACCTL1 & CCIFG) == 0) {/* wait */} TACCR1 += baud_divider >> 1; for (int bit = 8; bit > 0; bit--) { TACCR1 += baud_divider; TACCTL1 = 0; while ((TACCTL1 & CCIFG) == 0) {/* wait */} if (TACCTL1 & CCI) byte |= 0x100; byte = byte >> 1; } P1SEL &= ~RXD; TACTL = 0; return (byte); } //==============================================================================
-
OCY got a reaction from bluehash in Receive only uart?
I wrote 4 little procedures. You can cut them down easily. For example, you may not need "set_baud" nor "auto_baud". And you may only need "getchar" or "putchar".
/******************************************************************************* * Sub-Standard I/O for LaunchPad Board * * OCY Nov 2010 * *******************************************************************************/ #include #define RXD BIT2 #define TXD BIT1 int baud_divider = 104; /* default for 9600 b/s @ SMCLK = 1 MHz */ //============================================================================== int set_baud ( int i ) { baud_divider = i; return (i); } //============================================================================== int auto_baud ( void ) { __no_init int zero; P1SEL |= RXD; TACCTL0 = 0; TACCTL1 = CM_2 | SCS | CAP; TACTL = TASSEL_2 | MC_2 | TACLR; while ((TACCTL1 & CCIFG) == 0) {/* wait */} zero = TACCR1; TACCTL1 = CM_1 | SCS | CAP; while ((TACCTL1 & CCIFG) == 0) {/* wait */} P1SEL &= ~RXD; TACTL = 0; return (baud_divider = TACCR1 - zero); } //============================================================================== int putchar ( int i ) { TACCR0 = 0; TACCTL0 = OUT; TACCTL1 = 0; P1SEL |= TXD; P1DIR |= TXD; TACTL = TASSEL_2 | MC_2 | TACLR; i = (i + 0x100) << 1; do { TACCR0 += baud_divider; if (i & 1) TACCTL0 = OUTMOD_1; else TACCTL0 = OUTMOD_5; while ((TACCTL0 & CCIFG) == 0) {/* wait */} } while ((i = (i >> 1)) != 0); P1DIR &= ~TXD; P1SEL &= ~TXD; TACTL = 0; return 1; }//============================================================================= int getchar ( void ) { int byte = 0; P1SEL |= RXD; TACCTL0 = 0; TACCTL1 = CM_2 | SCS | CAP; TACTL = TASSEL_2 | MC_2 | TACLR; while ((TACCTL1 & CCIFG) == 0) {/* wait */} TACCR1 += baud_divider >> 1; for (int bit = 8; bit > 0; bit--) { TACCR1 += baud_divider; TACCTL1 = 0; while ((TACCTL1 & CCIFG) == 0) {/* wait */} if (TACCTL1 & CCI) byte |= 0x100; byte = byte >> 1; } P1SEL &= ~RXD; TACTL = 0; return (byte); } //==============================================================================
-
OCY got a reaction from bluehash in IR remote control help
I do not have an arduino nor the TV you have. But I may be able to help you.
I assume that your arduino has an IR receiver and the program to capture your TV remote. You have already used those and got the numbers you quoted. Am I correct?
I also assume that you have a LaunchPad and an IR LED. You want to program them to turn on/off your TV.
I suggest that you try to use your arduino to capture the IR transmission from your LaunchPad too. By trial and error to get the same (or at least similar) numbers, after that you will be able to control the TV.
I suggest that you connect the IR LED to P1.2 with a series resistor. (You need to pull the jumper marked RXD at J3 out so that P1.2 is no longer connected to RXD.)
The program you need to write is to generate ~38kHz PWM wave at TA compare OUT1 and being able to start and stop that PWM according to a schedule. You then adjust that schedule until the IR transmission matches your TV remote.
If you need help to write this program, I can do that.
About those numbers you got. I do not understand the "A90" in the first line. Also the "(26): 10240 2500" part in the second line. Do you have any idea what they mean?
-- OCY