Jump to content
43oh

sol25

Members
  • Content Count

    20
  • Joined

  • Last visited

About sol25

  • Rank
    Member

Profile Information

  • Location
    United States
  1. @@dubnet, yes, these would be 2 chips on different boards and different power supplies. Im guessing i will have to stay with CAN. The distance im looking at is about ~4 or 5 meters. Where would be a good place to look for a tutorial on CAN for noobs like me?
  2. Thanks everyone for your help. What I need to do is send commands to a C2000 micro. I am trying to emulate a thermostat for a fan, I will be sending H, L, or M speed, ON or OFF and scheduling data. What would be my limitations if i use I2C? Again, thanks for all your help.
  3. @@spirilis, Thank you for your fast response! Is there any simple code examples to send and receive out there that you know of?
  4. Hello everyone! Just wanted to say thank you for all the support and guidance everyone in this forum has towards beginners, you guys have been of so much help!! Now, here is a question: I am trying to interface 2 microcontrollers, a MSP430F5529 with a C2000 F28335 I was told the MSP doesnt support CAN, I would have to convert SPI to CAN and go from there. What do you guys suggest? I have never successfully used communication protocols. Any good examples of send and receive out there? Thanks in advance!
  5. @@bobnova Hi thanks again for your help! I am using this. //code for Sending void setup() { Serial.begin(9600); } void loop() { Serial.write(52); delay(500); } //code for Receiving void setup() { Serial.begin(9600); } void loop() { if (Serial.available()) { int inByte = Serial.read(); if(inByte==52){pinMode(5,OUTPUT);}else{digitalWrite(5, LOW);} Serial.print(inByte); } } I cant see anything on the serial monitor so i added the code to light up an LED if i get "52" which is what the other launchap id sending. Nothing seems to work. I have connect
  6. Hello everyone! im here again for the 3rd time to ask for some advice/help. This forum has been so helpful! Recently i've implemented some code on a msp430g2553 to read a 7 segment LED display. My next step is to send that reading to another msp430 or maybe a c2000 micro-controller. End goal: Msp430-1 decodes the LED display and sends 2 digit number to the Msp430-2 then i display the numbers on my monitor. I was looking at the "wire" master write and slave read examples. I have implemented them but they seem not to work, i'm not sure of a couple of things. How do i address SCL and
  7. Thanks everyone! with all of your help, I got it working!
  8. @@RobG. @@spirilis, @@Antscran, @@rockets4kids you guys have all been very helpful! As far as code? I am using energia, Im not sure if i need to set up a DCO or Flash cmd file into energia to run it on the breadboard? I tried the cap and the resistor and i still cant get it to run. I know in CCS i can set up the DCO and program in flash, im just not sure how to do that, or if energia does that.
  9. Hi everyone! This is my second time on the forum. The first time i was here it was to ask for help with interrupts and an LED display. 43oh was very helpful and I accomplished my goal. Today I am here to ask for help again. Goal: Implement the code previously written into the chip only and drive it without the development board. (breadboard mode) I did some research and most post/websites told me that all i need is 3.3V and a 47k resistor going from VCC to the RST pin on the chip and that my program would start working... I tried this and it did not. reference:http://crossplatform
  10. @@bobnova, the delay helped a bit, I have move on to check every bit instead of the whole port at the same time. But i dont think this is efficient at all, if(State_A==0 && State_B==0 && State_C==0 && State_D==0 && State_E==0 && State_F==0 && State_G==1){digit2=0;} Im not sure if this method will take longer than creating an array and reading it in a for loop? I also changed my interrupts and disabled the opposite interrupt after one is triggered for example: interrupt 1 is triggered { disable interrupt 1 enable interrupt
  11. @@bobnova. @@abecedarian yeah this is what i did #pragma vector=PORT2_VECTOR __interrupt void Port_2A(void) { if(P2IFG & BIT2) { flag1=1; value=P1IN; P2IFG &= ~BIT2; } if(P2IFG & BIT1) { flag2=1; P2IFG &= ~BIT1; } seems to work fine. I still need a way to check all 7 inputs in port one and match them to a set pattern to read digits 0-9 ;/
  12. @@bobnova, Yes thats exactly what im showing when i pause the code. Another question i had is that since i have 2 digit displays, can i use the same port for 2 interrupts?
  13. @@bobnova I added while(1) //Loop forever { if(flag1 == 1) { if(value == 0x40){digit1=0;} if(value == 0x79){digit1=1; P2OUT ^=BIT4;} if(value == 0x24){digit1=2; } //value=0; flag1 = 0; } } } // Port 2 interrupt service routine #pragma vector=PORT2_VECTOR __interrupt void Port_2(void) { value=P1IN; flag1=1; P2IFG &= ~BIT2 ; // P1.4 IFG cleared } im outputting 0x79 which corresponds to digit 1 on the 7 segment display. if the "P2OUT ^= BIT4;" is inside that if statement my led never toggles meaning that the P1IN value is never 0x79. if i put t
  14. @@bobnova, if(value == 0x40){ digit1=0; } //if(value == 0x79){ digit1=1; P2OUT ^=BIT4; } //0x79 0xb01111001 //if(value == 0x24){ digit1=2; } // 0x24 0xb00100100 this is where my problem is. I disabled this and toggled P2.2 or bit 4 and i get the same results as you in my O scope.!!!! Now the question is, where would i do my "if P1IN = Something then digit1=number"? should i do it in the forever loop or in the interrupt itself?
  15. #include <msp430.h> #ifndef TIMER0_A1_VECTOR #define TIMER0_A1_VECTOR TIMERA1_VECTOR #define TIMER0_A0_VECTOR TIMERA0_VECTOR #endif volatile int i = 0; volatile int digit1; volatile char value; void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer if (CALBC1_1MHZ ==0xFF || CALDCO_1MHZ == 0xFF) { while(1); //trap for the Digitally controlled O. } BCSCTL1 = CALBC1_1MHZ; //set range for the O. DCOCTL = CALDCO_1MHZ; //set DCO step modulation 1MHZ P1DIR = 0; // Set set BIT0-6 AS INPUT BIT 7 AS OUTPUT. P2DIR = 0XF9; // set P2.1 AND P2.2 a
×
×
  • Create New...