Jump to content
43oh

MSP432

Members
  • Content Count

    18
  • Joined

  • Last visited

Reputation Activity

  1. Like
    MSP432 reacted to chicken in SPI between MSP430/432 and MCP3911   
    You will need to connect with DGND / GNDB.
     
    GND is the reference point to decide whether a signal is high or low. In electronics, connected GND is almost always required/assumed with only a few exceptions.
     
    Did you also check SS with the oscilloscope?
     
    Typically, SPI does not require pull-ups/downs. Unless explicitly mentioned in the datasheet of the MCP3911 or related evaluation boards, you probably don't need them.
  2. Like
    MSP432 reacted to energia in Systick/timer interrupts for ADC sampling   
    The clock frequency is set at 48MHz on the MSP432.
  3. Like
    MSP432 reacted to energia in Systick/timer interrupts for ADC sampling   
    Open up the example: File-Examples->10.Multitasking->TimerLibrary.
     
    Then replace the Sketch on the first tab with the Sketch below. This Sketch sets up a timer to trigger every 500 ms. In the timer trigger function, it sets a flag that is used in the main loop to do an analogRead(). Do not perform analogRead() in the trigger function. This function is executed in the ISR context and should contain as minimal code as possible.
    #include "Timer.h" volatile uint8_t adc_flag = false; Timer myTimer; void timerFunction() { adc_flag = true; } // Add setup code void setup() { Serial.begin(115200); Serial.print(Timer_getNumTimers(), DEC); Serial.println(" timers"); Serial.print("myTimer.begin... "); myTimer.begin(timerFunction, 500); Serial.println("done"); Serial.print("myTimer.start... "); myTimer.start(); Serial.println("done"); // Set the analog resolution to 14 bits analogReadResolution(14); } // Add loop code void loop() { if (adc_flag) { adc_flag = false; uint16_t adc_val = analogRead(A0); Serial.print("Analog value: "); Serial.println(adc_val); } } Thanks to @reivilo for putting this timer library together.
×
×
  • Create New...