Jump to content


  • Content Count

  • Joined

  • Last visited

  1. If you read my previous post, do not use brief_pause fixed the first issue, that's why I do not use brief_pause anymore: Ahh, this could be a good advice. I'll try this evening. I am totally new to
  2. All right, it seems all the crap comes from the pause functions... If I remove ppause and brief_pause, LEDs light very low, but I can see they what is expected! My question is then: what sould I use to perform some pause during the execution to light on the wanted LEDs? ie. what function should replace ppause or brief_pause. By the way, brief_pause is the function recommended by the mspgcc faq.
  3. Hi, I found a solution. I changed the brief_pause function (in assembler) with ppause, a function with a simple loop. The simple example, with foo variable, now works fine. But the program does not achieve the wanted behavior. I posted the full code here, if you want to take a look. Maybe I'll create another thread.
  4. I can not test right now, but: This source code is just here as an example. I need this variable as a global one. And I don't want a constant (define). Maybe I could try to instantiate foo in main, instead of doing that at declaration. But I am pretty sure I already tried. Already tested, it did not changed anything. :|
  5. Hi there, I have some troubles with msp-gcc. I am trying multiplexing with 12 LEDs, and I encounter a big issue. To sum up, if I use a variable in an if statement, it does not work more than 2 seconds. If I use a constant, it works like a charm. Here the source: void brief_pause(register unsigned int n) { asm volatile( "1: \n\t" "dec %0 \n\t" "jne 1b\n\t" : "+r" (n)); } int foo = 8; void refresh() { int i; for (i = 0; i < 12; i++) { // with this if statement, it works if ( i == 8 ) { // here the faulty if // if ( i == foo ) { // switch on LED i } brief_paus
  6. You were absolutely right! More precisely, the guilty pins were P1.1 and P1.2. Removing RXD and TXD solved the problem! Yes, that's what I am trying. And it is actually working quite well. MSP is like a drug!
  7. Hello, I have an hardware question. I am testing multiplexing with my msp430g2231. To do that, I need three states, so I use the high impedance of a pin, setting it to input (P1DIR = 0) It works like a charm with almost all pins: the hi-Z state produce an output of 1.5V But on pins 0 and 1, hi-Z state shows 3V. Some unwanted LEDs weakly light on... Is it a known issue? Or is there a problem with my msp430g2231? Thanks!
  8. Hello, I am totally new to PIC programming, and more generally to electronic. My electronic skills are just blur school memories... I must think a couple of seconds before measuring current (serie or parallel...). On the other hand, I am a computer ingineer; programing should be the easy part. I finally receive all I needed to start: some LEDs and resistors. I enjoy it from 1 week, and I think I'm going to spend a lot of time above my breadboard!
  • Create New...