Jump to content

PTB

Members
  • Content Count

    113
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by PTB

  1. Interesting. I too would be interested to know if it is energia friendly.
  2. PTB

    Noise in ADC

    Hmmmm then I'm out. That's all I got. Does kinda sound like a bad batch.
  3. PTB

    Noise in ADC

    Are the good ones and the bad ones using the same power supply? I was getting "wobbly" adc readings due to a cheap power supply. Problem went away when I used a more quality power supply. In my case an iPhone charger. Cheers PTB
  4. Every time I look at this project I can't help but think what an amazing job you have done on every aspect of this. Especially the hardware. Outstanding !! Cheers PTB
  5. I think TI have a typo in their documentation. One doc says 12000 and another says 1200. I'm betting on 1200
  6. You could also use some kind of external storage. If the data isn't too much you could store in an external eeprom chip. I2c or spi. Alternatively you could use an sd card.
  7. I got a lot of help for stellaris in this thread here. Very similar to Tiva Might be of use http://forum.43oh.com/topic/7153-stellaris-fast-analog-reads/?p=65472
  8. PTB

    Sensor design

    Hi, This might be an idea. http://ams.com/eng/Products/Magnetic-Position-Sensors/Angle-Position-On-Axis/AS5048A I have bought some of these with a view to a future project. Haven't started yet due to no free time. They sell a reasonably priced adaptor kit and an expensive demo kit. There's a library here. https://github.com/ZoetropeLabs/AS5048A-Arduino Might be of use ...... Might not. Cheers PTB
  9. Hi, Just wondering if there is any errr... Feedback from Ti on our feedback. Cheers Ptb
  10. I think there is some kind of limit. I found anything over 4gb got pretty funky. I tried a few different cards and they all misbehaved. I know the cards are good as they all work fine in my dslr camera. I'm not using sd.lib but rather petitfs. Same problem though. I found some 4gb cards on sale and bought a handful. Cheers Ptb
  11. Just my 2c for what its worth. 1) Yeah... me too on the international postage. Its a bit of a show stopper for me. I've gone to order a few things and then its "oh yeah that's right... forgot about that" and cancel the order. It was crazy cheap before. Maybe somewhere in the middle ground would be sustainable from both customer and providers point of view. 2) The info may be out there and I haven't been able to find it but it would be great to have some real basic info for moving a project from a Launchpad to a standalone bare bones circuit without an actual launchpad. I can do it with an Arduino, but not with any of the TI chips. I have looked at the Launchpad schematics, but am more interested in the minimum it needs to run. I'm a bit of a numpty when it comes to this stuff. Forgive me. Maybe provide template kicad/eagle schematics with the minimum requirements and the hobbyist can add their extra circuitry to that and make their own boards. 3) I like the cloud tools page. Some nice things in there in an uncluttered easy to find location. https://dev.ti.com/ 4) Really like energia. Its got some issues, but full credit to the guys undertaking the mammoth task of progressing it on many fronts. I promise I'll learn CCS one day.... honest. And as always.... thanks to Blue# for the site. Cheers PTB
  12. Nice ! Well deserved man. This site is the reason I got into TI Microcontrollers. You've created a great environment that has attracted some really knowledgeable and helpful folks. (And thanks again to all those guys by the way). Congratulations on the award. PTB
  13. http://forum.43oh.com/topic/3980-reflow-oven-booster-pack/
  14. And here are some example flash curve images, both single flash and multiple flash. The curves with multiple flash are currently only possible by using two of the circuit boards and two launchpads. One for measuring and one for firing off required sequence.
  15. Hi L.R.A Here's a link to the project thread I am working on. http://forum.43oh.com/topic/7346-stellaris-launchpad-camera-flash-timer-and-measurement-tool/?p=65887 I just added an update to help paint a better picture of what I am doing. Basically it is a flash timer and flash measurement tool. Currently I can get it to fire a user defined sequence or I can get it to measure a photographic flash pulse. But I cant get it to do both at the same time. I am hoping timers will help me with that. My plan was have the main program handle the Analogread to array while the timers are popping off those ports as listed in post above. The reason I want to run both those events at the same time is I wish to fire off a timed sequence of flashes and measure the resultant combined flash pulse of that sequence. The goal is to confirm the timed delay settings are correct and have aligned the flash pulses. Aligning the pulses will remove ghosting from the photographic images. This generally applies to mixing different types of flashes. I could buy several flashes of the same type and set them exactly the same. But where would the fun be in that Thanks PTB
  16. Thought I would post an update on this project to help paint a picture with my other questions in other threads. Hardware ======== I have gone to a new board layout which utilises the following new features. a) ULN2003 Darlington arrays to drive the leds. The old arrangement didnt have enough grunt to drive the leds off the mcu. Separated the bi-colour LEDS into separate discreet leds. Blue for Focus and Red For Shutter. c) Returned to 3.5mm Audio jacks instead of RJ45 jacks. Easier to get off the shelf cables. d) Added an extra booster pack set of pins in parallel. e) Moved design from Eagle to KiCAD Schematic Iridium Schematic.pdf e) I added a digital pot in an endeavour to make the light sensor auto-ranging for light levels. I failed on many fronts here. Firstly I screwed up big time on the chip socket. I somehow got a 18pin part in the board layout from a 16 pin part in the schematic. I only found out when I went to plug in the chip and the socket was too big. Nice work on my part. I am looking into making a small adaptor board to use the 16 pin chip in the 18 pin socket. Secondly, my thoughts of desensitising the phototransistor via programmable resistance appears futile anyway because the problem is actualy the phototransistor saturating. Adding resistance as per the circuit isnt going to help on that front. Did a bit of research on professional lightmeters and it would appear they cope with the problem by putting different strength filters on their light sensors and then you read off a different scale depending on which filter is in there. f) And lastly but certainly not leastly. @@Fred made me some awesome laser cut panels for the new design. These are sensational. I added some infill to the laser engraving and it looks better than the photo appears. Software ======== Lots of minor tweaks and improvements. Code updated to Energia 15. One of the really annoying things was misbehaviour of Some of the GPIO's It appears wire.begin(); screws up GPIO PD0 and PD1 I can turn pins PD0 and PD1 on and off at will until wire.begin(); is executed. After that PD0 is stuck Low and PD1 is stuck high. Fixed with info from this thread..... http://forum.43oh.com/topic/7421-new-energia-release-0101e0012-03202014/?p=60448 Thanks to @reaper and @@spirilis for that thread. And thanks again to @L.R.A for getting fast analog read back for me in Energia 15. Current Version 0.40 Here Iridium_v0.40.zip This code is very much a work in progress with lessons constantly being learnt. Still Working On ========== Investigating using timers instead of loops to trigger sequences. Cheers PTB
  17. +1 to what cubeberg said. I had a noisy wall wart that would make my analog readings look like an earthquake seismograph. Might be that. Might be something else.
  18. Hi Guys, Another learning experience for me. I'm toying with the idea of implementing timers into my project which uses the STELLARIS launchpad LM4F. I've never used timers before so the questions are going to be pretty dumb. I think due to the choices of pins I have used, I may not be able to do it. I have 8 ports set to trigger in a sequence. The ports I am using are as per below and I suspect I may not be able to use timers due to using ports PA4 and PE1. I got the info from page 665-666 in http://www.datasheets.pl/integrated_circuits/L/LM/LM4F120H5QR.pdf Flash # Port Pin Name General-Purpose Timers Signals (64LQFP) ========================================================== 1 PF4 T2CCP0 16/32-Bit Timer 2 Capture/Compare/PWM 0. 2 PA4 ? NIL ? 3 PD0 WT2CCP0 32/64-BitWide Timer 2 Capture/Compare/PWM 0. 4 PD2 WT3CCP0 32/64-BitWide Timer 3 Capture/Compare/PWM 0. 5 PE1 ? NIL ? 6 PD6 WT5CCP0 32/64-BitWide Timer 5 Capture/Compare/PWM 0. 7 PC6 WT1CCP0 32/64-BitWide Timer 1 Capture/Compare/PWM 0. 8 PC4 WT0CCP0 32/64-BitWide Timer 0 Capture/Compare/PWM 0. Am I right in assuming I wont be able to use a timer on PA4 or PE1 ? And secondly, if I can get timers to trigger those 8 ports would they be able to trigger independently of other running code and not screw with this Fast Analog Read routine at the same time. http://forum.43oh.com/topic/7153-stellaris-fast-analog-reads/?p=65472 Would just like to know if it is possible and if so I'll see if I can get it happening. Thanks PTB
  19. Hi Rob, I have a few of the early LCD Booster Packs. Love 'em. Have never used the sd card slot on the booster pack as I have one elsewhere in my project. If I was redoing it from scratch I would forego my sd card socket for yours. I think it should definitely stay. Its such a nice to have. Two booster packs in one Great for data logging. I'd be happy to pay a little extra to save extra hassle implementing elsewhere. Be nice to not have to worry about soldering it. Cheers PTB
  20. L.R.A. You are the man ! Its working. Number of Samples : 255 Sample Starttime : 3143376 Sample Endtime : 3143888 Sample Array Set Duration time in microseconds : 512 ======================= Now this is only 0.5 MSPS instead of 1 BUT.... the old code would sometimes do that anyway. Sometimes it was 1MSPS sometimes it was 0.5MSPS. At least now its consistent. 1MSPS would be obviously nicer, but this is still pretty great. I will splice this back into my main code and see how she goes. I'll do further project based posts in another thread. I've made some priceless mistakes..... I'm not ashamed to share Thanks heaps !!!! Really Appreciate it. Cheers PTB P.S. BTW I tried with and without this line SysCtlDelay(3); It didn't seem to mind either way. Working Code under Energia 15 // // LM4F_ADC // A Stellarisiti Collaborative effort // JKabat, Rei Vilo, reaper7,L.R.A. PTB. // // Include application, user and local libraries // Define variables and constants /// /// @file Fast_Analog_Read.ino /// @brief Main sketch /// /// @details Fast Analog Read Investigations for Stellaris LM4F /// // // Stellaris Pin Assignments // ========================= //PE_3 //Sensor Analog Read //PA_5 //Trigger Analog Signal Pulse //PF_4 //Push Button to Start // // Libraries // ========= #include "Energia.h" #include "SPI.h" #include "inc/lm4f120h5qr.h" #include "inc/hw_adc.h" #include "inc/hw_gpio.h" #include "inc/hw_memmap.h" #include "inc/hw_sysctl.h" #include "driverlib/adc.h" #include "driverlib/gpio.h" #include "driverlib/sysctl.h" #include "driverlib/rom.h" // // Constants from adc.c // ==================== #define ADC_SEQ (ADC_O_SSMUX0) #define ADC_SEQ_STEP (ADC_O_SSMUX1 - ADC_O_SSMUX0) #define ADC_SSFIFO (ADC_O_SSFIFO0 - ADC_O_SSMUX0) #define ADC_SSFSTAT (ADC_O_SSFSTAT0 - ADC_O_SSMUX0) #define SEQUENCER 0 // // Global Constants // ================ const byte SampleQty = 255; // number of samples const uint16_t buttonPin = PUSH1; // the number of the pushbutton pin const uint16_t ledPin = GREEN_LED; // the number of the LED pin const uint16_t TriggerPin = PA_5; // Analog Signal Trigger connected to digital pin PA_5 // // Global Variables // ================ uint16_t SampleTest; uint16_t buttonState = 0; // variable for reading the pushbutton status uint16_t Sample[SampleQty]; // Array variable to store the value coming from the sensor //unsigned long SampleStartTime; uint32_t SampleStartTime; //unsigned long SampleEndTime; uint32_t SampleEndTime; //unsigned long SampleDuration; uint32_t SampleDuration; //unsigned long faBase; uint32_t faBase; // // Prototypes // ========== uint16_t fast_analogInit(uint8_t pin); uint16_t fast_analogRead(void); ///************************************************************************** /// /// Setup code /// ///************************************************************************** void setup() { Serial.begin(9600) ; //Debugging initialize the serial communication: pinMode(ledPin, OUTPUT); // initialize the LED pin as an output: pinMode(buttonPin, INPUT_PULLUP); // initialize the pushbutton pin as an input: pinMode(TriggerPin, OUTPUT); // initialize the Trigger pin as an output: Serial.println("Stellaris Fast Analog Read"); Serial.println("=========================="); Serial.println(""); Serial.println("Press SW1 to commence test"); }//end setup ///************************************************************************** /// /// Loop code /// ///************************************************************************** void loop() { buttonState = digitalRead(buttonPin); // read the state of the pushbutton value: if (buttonState == LOW) { digitalWrite(ledPin, HIGH); // turn LED on: Serial.println("Initialising Stellaris Fast Analog Read"); fast_analogInit(PE_3); Serial.println("Stellaris Fast Analog Read Initialised"); SampleStartTime = micros(); digitalWrite(TriggerPin, HIGH); // Start the Analog Signal for (uint16_t i=0;i<SampleQty;i++) { Sample[i] = fast_analogRead(); } SampleEndTime = micros(); //Dump results to serial monitor for (uint16_t i=0;i<SampleQty;i++) { Serial.println(Sample[i]); } Serial.print("Number of Samples : "); Serial.println(SampleQty); Serial.print("Sample Starttime : "); Serial.println(SampleStartTime); Serial.print("Sample Endtime : "); Serial.println(SampleEndTime); SampleDuration = SampleEndTime - SampleStartTime; Serial.print("Sample Array Set Duration time in microseconds : "); Serial.println(SampleDuration); }// end if delay(1000); digitalWrite(ledPin, LOW); // turn LED off: }//end loop ///************************************************************************** /// /// Fast Analog Read Routine /// ///************************************************************************** uint16_t fast_analogRead(void) { // #define DEBUG #ifdef DEBUG Serial.println("1"); #endif uint32_t value[8]; #ifdef DEBUG Serial.println("2"); #endif //unsigned long *pulBuffer = &value[0]; uint32_t *pulBuffer = &value[0]; #ifdef DEBUG Serial.println("3"); #endif //unsigned long ulCount; uint32_t ulCount; #ifdef DEBUG Serial.println("4"); #endif //unsigned long ulBase = faBase; uint32_t ulBase = faBase; #ifdef DEBUG Serial.println("5"); #endif HWREG(ADC0_BASE + ADC_O_ISC) = 1 << SEQUENCER; //<==== Hangs on this line here #ifdef DEBUG Serial.println("6"); #endif HWREG(ADC0_BASE + ADC_O_PSSI) |= ((SEQUENCER & 0xffff0000) | (1 << (SEQUENCER & 0xf))); #ifdef DEBUG Serial.println("7"); #endif while (!(HWREG(ADC0_BASE + ADC_O_RIS) & (0x10000 | (1 << SEQUENCER)))) {} #ifdef DEBUG Serial.println("8"); #endif HWREG(ADC0_BASE + ADC_O_ISC) = 1 << SEQUENCER; #ifdef DEBUG Serial.println("9"); #endif ulBase = ADC0_BASE + (ADC_SEQ + (ADC_SEQ_STEP * SEQUENCER)); #ifdef DEBUG Serial.println("10"); #endif ulCount = 0; #ifdef DEBUG Serial.println("11"); #endif while(!(HWREG(ulBase + ADC_SSFSTAT) & ADC_SSFSTAT0_EMPTY) && (ulCount < 8)) { #ifdef DEBUG Serial.println("12"); #endif value[ulCount] = HWREG(ulBase + ADC_SSFIFO); #ifdef DEBUG Serial.println("13"); #endif ulCount++; } return value[0]; } ///************************************************************************** /// /// Fast Analog Init Routine /// ///************************************************************************** uint16_t fast_analogInit(uint8_t pin) { uint8_t port = digitalPinToPort(pin); uint16_t value[1]; uint32_t channel = digitalPinToADCIn(pin); if (pin == NOT_ON_ADC) { //invalid ADC pin return(0); } faBase = (uint32_t)portBASERegister(port); ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0); // SysCtlDelay(3);// <= New addition ROM_GPIOPinTypeADC((uint32_t)portBASERegister(port), digitalPinToBitMask(pin)); ROM_ADCSequenceConfigure(ADC0_BASE, SEQUENCER, ADC_TRIGGER_PROCESSOR, 0); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 0, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 1, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 2, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 3, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 4, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 5, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 6, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 7, channel | ADC_CTL_IE | ADC_CTL_END); ROM_ADCSequenceEnable(ADC0_BASE, SEQUENCER); //ROM_SysCtlADCSpeedSet(SYSCTL_ADCSPEED_1MSPS);//<= Identified By L.R.A. as problem line //HWREG(SYSCTL_RCGC0) &= ~SYSCTL_RCGC0_ADC0SPD_M; // change if you want ADC1 //HWREG(SYSCTL_RCGC0) |= SYSCTL_RCGC0_ADC0SPD_1M; // change for the desired speed with the macros and the ADC module HWREG(ADC0_BASE+0xFC0) &= ~0xF; HWREG(ADC0_BASE+0xFC0) |= 0x7; return(1); }
  21. L.R.A. I appreciate your help. I'll keep having a play. Its all kinda bizarro as it ran under energia 9 and 10. Cheers PTB
  22. Hi L.R.A. I may have misinterpreted what you were saying. I disabled the line you mentioned in the init routine and replaced it with those last 2 lines. unfortunately it hangs at the same spot. Was that what I was supposed to do ? This HWREG stuff is definitely outside my skillset. Cheers PTB // // LM4F_ADC // A Stellarisiti Collaborative effort // JKabat, Rei Vilo, reaper7, PTB. // // Include application, user and local libraries // Define variables and constants /// /// @file Fast_Analog_Read.ino /// @brief Main sketch /// /// @details Fast Analog Read Investigations for Stellaris LM4F /// // // Stellaris Pin Assignments // ========================= //PE_3 //Sensor Analog Read //PA_5 //Trigger Analog Signal Pulse //PF_4 //Push Button to Start // // Libraries // ========= #include "Energia.h" #include "SPI.h" #include "inc/lm4f120h5qr.h" #include "inc/hw_adc.h" #include "inc/hw_gpio.h" #include "inc/hw_memmap.h" #include "inc/hw_sysctl.h" #include "driverlib/adc.h" #include "driverlib/gpio.h" #include "driverlib/sysctl.h" #include "driverlib/rom.h" // // Constants from adc.c // ==================== #define ADC_SEQ (ADC_O_SSMUX0) #define ADC_SEQ_STEP (ADC_O_SSMUX1 - ADC_O_SSMUX0) #define ADC_SSFIFO (ADC_O_SSFIFO0 - ADC_O_SSMUX0) #define ADC_SSFSTAT (ADC_O_SSFSTAT0 - ADC_O_SSMUX0) #define SEQUENCER 0 // // Global Constants // ================ const byte SampleQty = 255; // number of samples const uint16_t buttonPin = PUSH1; // the number of the pushbutton pin const uint16_t ledPin = GREEN_LED; // the number of the LED pin const uint16_t TriggerPin = PA_5; // Analog Signal Trigger connected to digital pin PA_5 // // Global Variables // ================ uint16_t SampleTest; uint16_t buttonState = 0; // variable for reading the pushbutton status uint16_t Sample[SampleQty]; // Array variable to store the value coming from the sensor //unsigned long SampleStartTime; uint32_t SampleStartTime; //unsigned long SampleEndTime; uint32_t SampleEndTime; //unsigned long SampleDuration; uint32_t SampleDuration; //unsigned long faBase; uint32_t faBase; // // Prototypes // ========== uint16_t fast_analogInit(uint8_t pin); uint16_t fast_analogRead(void); ///************************************************************************** /// /// Setup code /// ///************************************************************************** void setup() { Serial.begin(9600) ; //Debugging initialize the serial communication: pinMode(ledPin, OUTPUT); // initialize the LED pin as an output: pinMode(buttonPin, INPUT_PULLUP); // initialize the pushbutton pin as an input: pinMode(TriggerPin, OUTPUT); // initialize the Trigger pin as an output: Serial.println("Stellaris Fast Analog Read"); Serial.println("=========================="); Serial.println(""); Serial.println("Press SW1 to commence test"); }//end setup ///************************************************************************** /// /// Loop code /// ///************************************************************************** void loop() { buttonState = digitalRead(buttonPin); // read the state of the pushbutton value: if (buttonState == LOW) { digitalWrite(ledPin, HIGH); // turn LED on: Serial.println("Initialising Stellaris Fast Analog Read"); fast_analogInit(PE_3); Serial.println("Stellaris Fast Analog Read Initialised"); SampleStartTime = micros(); digitalWrite(TriggerPin, HIGH); // Start the Analog Signal for (uint16_t i=0;i<SampleQty;i++) { Sample[i] = fast_analogRead(); } SampleEndTime = micros(); //Dump results to serial monitor for (uint16_t i=0;i<SampleQty;i++) { Serial.println(Sample[i]); } Serial.print("Number of Samples : "); Serial.println(SampleQty); Serial.print("Sample Starttime : "); Serial.println(SampleStartTime); Serial.print("Sample Endtime : "); Serial.println(SampleEndTime); SampleDuration = SampleEndTime - SampleStartTime; Serial.print("Sample Array Set Duration time in microseconds : "); Serial.println(SampleDuration); }// end if delay(1000); digitalWrite(ledPin, LOW); // turn LED off: }//end loop ///************************************************************************** /// /// Fast Analog Read Routine /// ///************************************************************************** uint16_t fast_analogRead(void) { #define DEBUG #ifdef DEBUG Serial.println("1"); #endif uint32_t value[8]; #ifdef DEBUG Serial.println("2"); #endif //unsigned long *pulBuffer = &value[0]; uint32_t *pulBuffer = &value[0]; #ifdef DEBUG Serial.println("3"); #endif //unsigned long ulCount; uint32_t ulCount; #ifdef DEBUG Serial.println("4"); #endif //unsigned long ulBase = faBase; uint32_t ulBase = faBase; #ifdef DEBUG Serial.println("5"); #endif HWREG(ADC0_BASE + ADC_O_ISC) = 1 << SEQUENCER; //<==== Hangs on this line here #ifdef DEBUG Serial.println("6"); #endif HWREG(ADC0_BASE + ADC_O_PSSI) |= ((SEQUENCER & 0xffff0000) | (1 << (SEQUENCER & 0xf))); #ifdef DEBUG Serial.println("7"); #endif while (!(HWREG(ADC0_BASE + ADC_O_RIS) & (0x10000 | (1 << SEQUENCER)))) {} #ifdef DEBUG Serial.println("8"); #endif HWREG(ADC0_BASE + ADC_O_ISC) = 1 << SEQUENCER; #ifdef DEBUG Serial.println("9"); #endif ulBase = ADC0_BASE + (ADC_SEQ + (ADC_SEQ_STEP * SEQUENCER)); #ifdef DEBUG Serial.println("10"); #endif ulCount = 0; #ifdef DEBUG Serial.println("11"); #endif while(!(HWREG(ulBase + ADC_SSFSTAT) & ADC_SSFSTAT0_EMPTY) && (ulCount < 8)) { #ifdef DEBUG Serial.println("12"); #endif value[ulCount] = HWREG(ulBase + ADC_SSFIFO); #ifdef DEBUG Serial.println("13"); #endif ulCount++; } return value[0]; } ///************************************************************************** /// /// Fast Analog Init Routine /// ///************************************************************************** uint16_t fast_analogInit(uint8_t pin) { uint8_t port = digitalPinToPort(pin); uint16_t value[1]; uint32_t channel = digitalPinToADCIn(pin); if (pin == NOT_ON_ADC) { //invalid ADC pin return(0); } faBase = (uint32_t)portBASERegister(port); ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0); ROM_GPIOPinTypeADC((uint32_t)portBASERegister(port), digitalPinToBitMask(pin)); ROM_ADCSequenceConfigure(ADC0_BASE, SEQUENCER, ADC_TRIGGER_PROCESSOR, 0); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 0, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 1, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 2, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 3, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 4, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 5, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 6, channel | ADC_CTL_IE); ROM_ADCSequenceStepConfigure(ADC0_BASE, SEQUENCER, 7, channel | ADC_CTL_IE | ADC_CTL_END); ROM_ADCSequenceEnable(ADC0_BASE, SEQUENCER); //ROM_SysCtlADCSpeedSet(SYSCTL_ADCSPEED_1MSPS);//<= Identified By L.R.A. as problem line HWREG(SYSCTL_RCGC0) &= ~SYSCTL_RCGC0_ADC0SPD_M; // change if you want ADC1 HWREG(SYSCTL_RCGC0) |= SYSCTL_RCGC0_ADC0SPD_1M; // change for the desired speed with the macros and the ADC module return(1); }
  23. @L.R.A. Hi L.R.A. Thanks heaps for looking into this. Goodness that code has gone to the dogs. It wasn't like that when I left it.... honest Just reposted and it looks alright at the moment. I must have wrecked it when I edited a typo the other day. I'll give that suggestion a crack tomorrow after work and see what happens. Thanks again for looking. Cheers PTB
×
×
  • Create New...