Search Results

Search found 111 results on 5 pages for 'microcontroller'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • Microcontroller to Microcontroller SPI communication

    - by onaclov2000
    Hello again, I was doing some reading and have even gotten a "master" SPI working on my microcontroller. Here is my question, basically if the master wants to initialize a write to the slave we write to the SSPBUF, how do we control what the slave responds with? The datasheet doesn't seem really clear to me the order of events in that case. I.E. Master puts a char into the SSPBUF, this initiates the SPI module to send data to the slave, during the shift, the slave returns a byte. In the slave side, is there something that tells you you have incoming data, and you can write to your SSPBUF first, THEN accept the data? OR Do you have to write to the SSPBUF the first "return value" you want sent back before the master can have an opportunity to initiate a transfer?

    Read the article

  • Cross-platform (microcontroller-PC) algorithm development

    - by Kyr
    Hello people! I was asked to develop a algorithm for network application on C. This project will be developed on Linux for PC and then it will be transferred to a more portable platform, something that will include a microcontroller. There are many microcontroller/companies out there that provide very nice and large libraries for TCP/IP. This software will hold statistics on the network performance. The whole idea of a cross platform (uC - PC) seems rubbish to me cause eventually the code should be written in a more platform specific way for the microcontroller, but I am not expert to judge anyway. Is there any clever way of doing this or is there a anyone that did this before? My brainstorming has "Wrapper library" and "Matlab"... Any ideas? Thx!

    Read the article

  • What did you develop using a microcontroller?

    - by DR
    I've always been fascinated by microcontrollers and I'm planning to do a few hobby projects just to satisfy my inner geek :) I'm looking for ideas and motivation, so what did you develop using a microcontroller? If possible please state the microcontroller and/or development environment and an estimate on hardware costs beyond the basic equipment (if applicable). I'm interested in both successful and failed projects and any problems you encountered.

    Read the article

  • linear interpolation on 8bit microcontroller

    - by JB
    I need to do a linear interpolation over time between two values on an 8 bit PIC microcontroller (Specifically 16F627A but that shouldn't matter) using PIC assembly language. Although I'm looking for an algorithm here as much as actual code. I need to take an 8 bit starting value, an 8 bit ending value and a position between the two (Currently represented as an 8 bit number 0-255 where 0 means the output should be the starting value and 255 means it should be the final value but that can change if there is a better way to represent this) and calculate the interpolated value. Now PIC doesn't have a divide instruction so I could code up a general purpose divide routine and effectivly calculate (B-A)/(x/255)+A at each step but I feel there is probably a much better way to do this on a microcontroller than the way I'd do it on a PC in c++ Has anyone got any suggestions for implementing this efficiently on this hardware?

    Read the article

  • Getting started with microcontroller programming

    - by Trix
    I'm a fairly good programmer, knowledgeable in C, C++, Python, Ruby and PHP. I'd like to get started with microcontroller programming. I do know nothing about this topic. Microcontrollers are minimal computers on little circuit boards, right? I'm pretty new to electronics too, do I need to be an expert in it to do stuff with microcontrollers? What can I do with them? Would e.g.: A Pacman or Tetris game on an LCD be possible and not too hard? Where should I start? Basically I want to program something really small I can then take with me. This is my only real goal. Are microcontrollers the right thing for this, or are there better solutions? I'd like to do this for fun and as a hobby, I don't want to become a professional in it.

    Read the article

  • Looking for ideas for a simple pattern matching algorithm to run on a microcontroller

    - by pic_audio
    I'm working on a project to recognize simple audio patterns. I have two data sets, each made up of between 4 and 32 note/duration pairs. One set is predefined, the other is from an incoming data stream. The length of the two strongly correlated data sets is often different, but roughly the same "shape". My goal is to come up with some sort of ranking as to how well the two data sets correlate/match. I have converted the incoming frequencies to pitch and shifted the incoming data stream's pitch so that it's average pitch matches that of the predefined data set. I also stretch/compress the incoming data set's durations to match the overall duration of the predefined set. Here are two graphical examples of data that should be ranked as strongly correlated: http://s2.postimage.org/FVeG0-ee3c23ecc094a55b15e538c3a0d83dd5.gif (Sorry, as a new user I couldn't directly post images) I'm doing this on a 8-bit microcontroller so resources are minimal. Speed is less an issue, a second or two of processing isn't a deal breaker. It wouldn't surprise me if there is an obvious solution, I've just been staring at the problem too long. Any ideas? Thanks in advance...

    Read the article

  • Figuring out the performance limitation of an ADC on a PIC microcontroller

    - by AKE
    I'm spec-ing the suitability of a microcontroller like PIC for an analog-to-digital application. This would be preferable to using external A/D chips. To do that, I've had to run through some computations, pulling the relevant parameters from the datasheets. I'm not sure I've got it right -- would appreciate a check! Here's the simplest example: PIC10F220 is the simplest possible PIC with an ADC. Runs at clock speed of 8MHz. Has an instruction cycle of 0.5us (4 clock steps per instruction) So: Taking Tacq = 6.06 us (acquisition time for ADC, assume chip temp. = 50*C) [datasheet p34] Taking Fosc = 8MHz (? clock speed) Taking divisor = 4 (4 clock steps per CPU instruction) This gives TAD = 0.5us (TAD = 1/(Fosc/divisor) ) Conversion time is 13*TAD [datasheet p31] This gives conversion time 6.5us ADC duration is then 12.56 us [? Tacq + 13*TAD] Assuming at least 2 instructions for load/store: This is another 1 us [0.5 us per instruction] Which would give max sampling rate of 73.7 ksps (1/13.56) Supposing 8 more instructions for real-time processing: This is another 4 us Thus, total ADC/handling time = 17.56us (12.56us + 1us + 4us) So expected upper sampling rate is 56.9 ksps. Nyquist frequency for this sampling rate is therefore 28 kHz. If this is right, it suggests the (theoretical) performance suitability of this chip's A/D is for signals that are bandlimited to 28 kHz. Is this a correct interpretation of the information given in the data sheet? Any pointers would be much appreciated! AKE

    Read the article

  • Figuring out the Nyquist performance limitation of an ADC on an example PIC microcontroller

    - by AKE
    I'm spec-ing the suitability of a dsPIC microcontroller for an analog-to-digital application. This would be preferable to using dedicated A/D chips and a separate dedicated DSP chip. To do that, I've had to run through some computations, pulling the relevant parameters from the datasheets. I'm not sure I've got it right -- would appreciate a check! (EDITED NOTE: The PIC10F220 in the example below was selected ONLY to walk through a simple example to check that I'm interpreting Tacq, Fosc, TAD, and divisor correctly in working through this sort of Nyquist analysis. The actual chips I'm considering for the design are the dsPIC33FJ128MC804 (with 16b A/D) or dsPIC30F3014 (with 12b A/D).) A simple example: PIC10F220 is the simplest possible PIC with an ADC Runs at clock speed of 8MHz. Has an instruction cycle of 0.5us (4 clock steps per instruction) So: Taking Tacq = 6.06 us (acquisition time for ADC, assume chip temp. = 50*C) [datasheet p34] Taking Fosc = 8MHz (? clock speed) Taking divisor = 4 (4 clock steps per CPU instruction) This gives TAD = 0.5us (TAD = 1/(Fosc/divisor) ) Conversion time is 13*TAD [datasheet p31] This gives conversion time 6.5us ADC duration is then 12.56 us [? Tacq + 13*TAD] Assuming at least 2 instructions for load/store: This is another 1 us [0.5 us per instruction] Which would give max sampling rate of 73.7 ksps (1/13.56) Supposing 8 more instructions for real-time processing: This is another 4 us Thus, total ADC/handling time = 17.56us (12.56us + 1us + 4us) So expected upper sampling rate is 56.9 ksps. Nyquist frequency for this sampling rate is therefore 28 kHz. If this is right, it suggests the (theoretical) performance suitability of this chip's A/D is for signals that are bandlimited to 28 kHz. Is this a correct interpretation of the information given in the data sheet in obtaining the Nyquist performance limit? Any opinions on the noise susceptibility of ADCs in PIC / dsPIC chips would be much appreciated! AKE

    Read the article

  • 8051 microcontroller kit recommendation?

    - by LucidDefender
    I'm a first year Computer Science student looking to get started with development for micro-controllers. I'd like to use the 8051, as it's common as dirt, and is used frequently in the real world. During my junior or senior year, I'll be taking a PIC micro-controller based embedded design class, so I'd rather not do PIC now; otherwise, I'll be fairly bored during that course. Most commercial kits I see are for the AVR or PIC series of microprocessors. I'm just looking for something with decent development tools, documentation, and enough add-ons to keep my novice self occupied for the summer. Any recommendations for an 8051 family kit? Thanks!

    Read the article

  • Is it stable to change I/O direction on microcontroller repeatedly?

    - by SS
    I'm new to microcontroller programming and I have interfaced my microcontroller board to another device that provides a status based on the command send to it but, this status is provided on the same I/O pin that is used to provide data. So basically, I have an 8-bit data line that is used as an output from the microcontroller, but for certain commands I get a status back on one of the data lines if I choose to read it. So I would be required to change the direction of this one line to read the status thus converting this line as an ouput to an input and then back to an output. Is this acceptable programming or will this changing of the I/O pin this frequently cause instability? Thanks.

    Read the article

  • Learning Electronics & the Arduino Microcontroller

    - by Chris Williams
    Lately, I've had a growing interest in Electronics & Microcontrollers. I'm a loyal reader of Make Magazine and thoroughly enjoy seeing all the various projects in each issue, even though I rarely try to make any of them. I've been reading and watching videos about the Arduino, which is an open source Microcontroller and software project that the people at Make (and a lot of other folks) are pretty hot about. Even the prebuilt hardware is remarkably inexpensive , although there are kits available to build one from the base components. (Full disclosure: I bought my first soldering iron... EVER... just last week, so I fully acknowledge the likelihood of making some mistakes. That's why I'm not trying to do the "build it yourself" kit just yet. It's also another reason to be happy the hardware is so cheap.) There are a number of different Arduino boards available, but the two that have really piqued my interest are the Arduino UNO and the NETduino. The UNO is a very popular board, with a number of features and is under $35 which means I won't hurl myself off a bridge when I inevitably destroy it. The NETduino is very similar to the Arduino UNO and has the added advantage of being programmable with... you guessed it... C#. I'm actually ordering both boards and some miscellaneous other doodads to go with them.  There are a few good websites for this sort of thing, including www.makershed.com and www.adafruit.com. The price difference is negligible, so in my case, I'm ordering from Maker Shed (the Make Magazine people) because I want to support them. :) I've also picked up a few O'Reilly books on the subject which I am looking forward to reading & reviewing: Make: Electronics, Arduino: A Quick Start Guide and Getting Started With Arduino (all three of which arrived on my doorstep today.) This ties in with my "learn more about robotics" goals as well, since I'll need a good understanding of Electronics if I want to move past Lego Mindstorms eventually.

    Read the article

  • Arduino IDE not connecting to microcontroller

    - by JDD
    I get this error when trying to connect to an Arduino through a USB serial connection. I'm using the Arduino IDE 1.0.1 and the 64bit version of Ubuntu 12.04. This has been a reoccurring problem since 10.04 and happens to a few other programs that use a serial connection too. I have no problem getting serial data from the Arduino using Python or Screen. The Arduino IDE seems to work just fine otherwise. processing.app.SerialException: Error opening serial port '/dev/ttyACM0'. at processing.app.Serial.<init>(Serial.java:178) at processing.app.Serial.<init>(Serial.java:92) at processing.app.SerialMonitor.openSerialPort(SerialMonitor.java:207) at processing.app.Editor.handleSerial(Editor.java:2447) at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:353) at java.awt.Component.processMouseEvent(Component.java:6386) at javax.swing.JComponent.processMouseEvent(JComponent.java:3268) at java.awt.Component.processEvent(Component.java:6154) at java.awt.Container.processEvent(Container.java:2045) at java.awt.Component.dispatchEventImpl(Component.java:4750) at java.awt.Container.dispatchEventImpl(Container.java:2103) at java.awt.Component.dispatchEvent(Component.java:4576) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4294) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227) at java.awt.Container.dispatchEventImpl(Container.java:2089) at java.awt.Window.dispatchEventImpl(Window.java:2518) at java.awt.Component.dispatchEvent(Component.java:4576) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:672) at java.awt.EventQueue.access$400(EventQueue.java:96) at java.awt.EventQueue$2.run(EventQueue.java:631) at java.awt.EventQueue$2.run(EventQueue.java:629) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116) at java.awt.EventQueue$3.run(EventQueue.java:645) at java.awt.EventQueue$3.run(EventQueue.java:643) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105) at java.awt.EventQueue.dispatchEvent(EventQueue.java:642) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177) at java.awt.EventDispatchThread.run(EventDispatchThread.java:138) Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:171) at processing.app.Serial.<init>(Serial.java:163) ... 35 more

    Read the article

  • GUI-Library for microcontroller

    - by Martin Kirsche
    I want to create a GUI driven application for a micro-controller (Atmel XMEGA) that is connected to a 128x64 dots graphics LCD (EA DOGL128-6) and 4 buttons for navigation. Controlling the display itself (e.g. drawing pixels and characters) is no problem but in order to prevent me from reinventing the wheel I was googling for a GUI-Library/-Toolkit that is written in c, includes its source code, will run on a 32 MHz 8-bit micro-controller and provides at least the following controls: panel (to group elements) menu (scrollable) icon label button line-graph (optional) But I didn't find any thing useful. Does anyone know (or better uses) such a library(preferably for free)?

    Read the article

  • Writing to EEPROM on PIC

    - by JB
    Are there any PIC microcontroller programmers here? I'm learning some PIC microcontroller programming using a pickit2 and the 16F690 chip that came with it. I'm working through trying out the various facilities at the moment. I can sucessfully read a byte from the EEPROM in code if I set the EEPROM vaklue in MPLAB but I don't seem to be able to modify the value using the PIC itsself. Simply nothing happens and I don't read back the modified value, I always get the original which implies to me that the write isn't working? This is my code for that section, am I missing something? I know I'm doing a lot of unnecessary bank switches, I added most of them to ensure that being on the wrong bank wasn't the issue. ; ------------------------------------------------------ ; Now SET the EEPROM location ZERO to 0x08 ; ------------------------------------------------------ BANKSEL EEADR CLRF EEADR ; Set EE Address to zero BANKSEL EEDAT MOVLW 0x08 ; Store the value 0x08 in the EEPROM MOVWF EEDAT BANKSEL EECON1 BSF EECON1, WREN ; Enable writes to the EEPROM BANKSEL EECON2 MOVLW 0x55 ; Do the thing we have to do so MOVWF EECON2 ; that writes can work MOVLW 0xAA MOVWF EECON2 BANKSEL EECON1 BSF EECON1, WR ; And finally perform the write WAIT BTFSC EECON1, WR ; Wait for write to finish GOTO WAIT BANKSEL PORTC ; Just to make sure we are on the right bank

    Read the article

  • Alternative languages for embedded programming

    - by RHaguiuda
    I`m looking for alternatives programming languages (from assembly, C, C++ and basic) to embedded (microcontroller) programming. Is it possible for example, to programm microcontrollers in C# or Java? Maybe Ruby or Phyton? If possible, please post development tools and hardware used. Thanks

    Read the article

  • Compile-time lookup array creation for ANSI-C?

    - by multiproximus
    A previous programmer preferred to generate large lookup tables (arrays of constants) to save runtime CPU cycles rather than calculating values on the fly. He did this by creating custom Visual C++ projects that were unique for each individual lookup table... which generate array files that are then #included into a completely separate ANSI-C micro-controller (Renesas) project. This approach is fine for his original calculation assumptions, but has become tedious when the input parameters need to be modified, requiring me to recompile all of the Visual C++ projects and re-import those files into the ANSI-C project. What I would like to do is port the Visual C++ source directly into the ANSI-C microcontroller project and let the compiler create the array tables. So, my question is: Can ANSI-C compilers compute and generate lookup arrays during compile time? And if so, how should I go about it? Thanks in advance for your help!

    Read the article

  • How do I use the Silicon Laboratories IDE with SDCC?

    - by David Cary
    I'm thinking about using a microcontroller with an 8051 core from Silicon Laboratories. I hope that I can use C rather than assembly language, so I installed SDCC. I installed the "Silicon Laboratories IDE" to download the executable binaries to the on-chip Flash program memory. It also supposedly can be set up (under the Project Tool Chain Integration menu) to use "any" 8051 compiler. I tried to set it up to use SDCC, but every time I hit the "Assemble/Compile File" button it tells me "Compiler process did not sucessfully complete." How do I get new C code I write onto the SiLabs C8051F310 chip? Is there a web site with a step-by-step HOWTO? (Would it be easier to use a MAKEFILE that calls SDCC, only using the "Silicon Laboratories IDE" for the very last step of downloading the executable binary to the chip?)

    Read the article

  • How to generate a video signal from Android device via USB?

    - by C.Rivlaldo
    Is it possible to create an application for Android, which can generate a video signal (HDMI or VGA) via USB? Any Android device has miniUSB port. Theoretically it's possible to create a small commutator device on microcontroller or microscheme, which will be a USB-host for Android device. You'll connect Android device with commutator and then connect commutator with monitor. For example, the scheme looks like: Android phone - commutator (USB-host) - TV/Monitor. Summary, I need to connect android phone with TV via miniUSB port. I found soft which can use miniUSB - HDMI cable, but those apps only for Motorolla Droid and HTC Evo. I'll glad to get links to existing apps or projects on that theme, to info about software generation HDMI-signal and connecting Android devices with another devices. Thank you and sorry for my bad english!

    Read the article

  • Plotting an Arc in Discrete Steps

    - by phobos51594
    Good afternoon, Background My question relates to the plotting of an arbitrary arc in space using discrete steps. It is unique, however, in that I am not drawing to a canvas in the typical sense. The firmware I am designing is for a gcode interpreter for a CNC mill that will translate commands into stepper motor movements. Now, I have already found a similar question on this very site, but the methodology suggested (Bresenham's Algorithm) appears to be incompatable for moving an object in space, as it only relies on the calculation of one octant of a circle which is then mirrored about the remaining axes of symmetry. Furthermore, the prescribed method of calculation an arc between two arbitrary angles relies on trigonometry (I am implementing on a microcontroller and would like to avoid costly trig functions, if possible) and simply not taking the steps that are out of the range. Finally, the algorithm only is designed to work in one rotational direction (e.g. counterclockwise). Question So, on to the actual question: Does anyone know of a general-purpose algorithm that can be used to "draw" an arbitrary arc in discrete steps while still giving respect to angular direction (CW / CCW)? The final implementation will be done in C, but the language for the purpose of the question is irrelevant. Thank you in advance. References S.O post on drawing a simple circle using Bresenham's Algorithm: "Drawing" an arc in discrete x-y steps Wiki page describing Bresenham's Algorithm for a circle http://en.wikipedia.org/wiki/Midpoint_circle_algorithm Gcode instructions to be implemented (see. G2 and G3) http://linuxcnc.org/docs/html/gcode.html

    Read the article

  • Syntax error while copying an multidimensional array to another in C

    - by mantuko
    We are programming a ST269 microcontroller which has two IR distance sensors. To calibrate these sensors we made one table for each sensor with the distance we measured and the corresponding value we get from the ADC. Now we want to use one function to approximate the values in between. So we defined two two-dimensional arrays (one for each sensor) as global variables. In our function we then want to copy the one array we want to work with to a working array and approximate our values. So here's the code: ... unsigned int ir_werte_re[][] = { {8,553}, ... {83,133} }; unsigned int ir_werte_li[][] = { {8,566}, ... {83,147} }; ... unsigned int geradenaproximation(unsigned int messwert, unsigned int seite) { unsigned int working_array[16][16]; unsigned int i = 0; if (seite == 0) { for (i = 0; i < sizeof(working_array); i++) { working_array[i][0] = ir_werte_li[i][0]; i++; } } else { for (i = 0; i < sizeof(working_array); i++) { working_array[i][0] = ir_werte_re[i][0]; i++; } } i = 0; unsigned int y1 = 0; unsigned int x1 = 0; ... } This code is in a file called sensor.c. We didn't write anything about our global arrays in the sensor.h should we? The sensor.h of course is included in our main.c and there the function is called. We also tried to copy the arrays via memcpy(working_array, ir_werte_li, sizeof(working_array)); And in every way we do this we get a syntax error near unsigned in the line where we're declaring unsigned int y1 = 0; and I'm pretty sure that there is no syntax error in this line : ) The last time I spend coding in C is a few years away so I'm not sure if the way we try to do this is good. Perhaps we can solve this by using a pointer instead of really copying the array or something. So please help me out I'll appreciate your bits on this.

    Read the article

  • Initializing SD card in SPI issues

    - by Sembazuru
    Sorry for the length of this question, but I thought it best to show as much detail to fend of questions asking if I had done A when I had already done A... ;-) I've had a look at the "micro-SD card initialization using SPI interface" thread and didn't see any answers that matched my issue (i.e. things I haven't already tried). I have a similar issue where I'm trying to access a SD card through a micro-controller's SPI interface (specifically an HC908). I've tried following the flow charts in the Physical Layer Simplified Specification v2.00 and it seems to initialize correctly on Transcend 1GB & 2GB and an AE&C 1GB card. But I'm having problems on 3 other random cards from my stash of old cards that I've used on my camera. My code is all HC908 assembler. I scoped out the SPI clock line and during initialization it's running about 350kHz (the only speed multiplier that the HC908 supplies at my low MCU clock speed that falls within the 100-400kHz window). Here are the results of the three cards that aren't completing my initialization routine (all done consecutively w/o changing any code or timing parameters): Canon 16Meg card (labeled as SD): Set card select high Send 80 SPI clock cycles (done by writing 0xFF 10 times) Set card select low Send CMD0 [0x400000000095] and Loop up to 8 times waiting for high bit on response to go low R1 = 0x01 (indicates idle) Send CMD8 [0x48000001AA87] and Loop up to 8 times waiting for high bit on response to go low R1 = 0x05 (idle and illegal command) Because illegal command set local flag to indicate v1 or MMC card Send CMD58 [0x7A00000000FD] and Loop up to 8 times waiting for high bit on response to go low R1 = 0x05 (idle and illegal command) because illegal command branch to error routine Send CMD13 [0x4D000000000D] (show status buffer) and Loop up to 8 times waiting for high bit on response to go low R1= 0x05 (idle and illegal command) Is the illegal command flag stuck? Should I be doing something after CMD8 to clear that flag? SanDisk UltraII 256Meg Set card select high Send 80 SPI clock cycles (done by writing 0xFF 10 times) Set card select low Send CMD0 [0x400000000095] and Loop up to 8 times waiting for high bit on response to go low R1 = 0x01 (idle) Send CMD8 [0x48000001AA87] and Loop up to 8 times waiting for high bit on response to go low R1 = 0x05 (idle and illegal command) Because illegal command set local flag to indicate v1 or MMC card Send CMD58 [0x7A00000000FD] and Loop up to 8 times waiting for high bit on response to go low R1 = 0x01 (idle) Send 0xFF 4 times to read OCR OCR = 0xFFFFFFFF Send CMD55 [0x770000000065] (1st part of ACMD41) and Loop up to 8 times waiting for high bit on response to go low R1 = 0x01 (idle) Send CMD41 [0x6900000000E5] (2nd part of ACMD41) and Loop up to 8 times waiting for high bit on response to go low R1 = 0x05 (idle and illegal command) Because illegal command, assume card is MMC Send CMD1 [0x4100000000F9] (for MMC) and Loop up to 8 times waiting for high bit on response to go low R1 = 0x05 (idle and illegal command) Repeat the CMD1 50 times (my arbitrary number to wait until idle clears) Every R1 response is 0x05 (idle and illegal command) Why is OCR all F? Doesn't seem proper at all. Also, why does ACMD41 and CMD1 respond illegal command? Is CMD1 failing because the card is waiting for a valid ACMD after the CMD55 even with the illegal command response? SanDisk ExtremeIII 2G: Set card select high Send 80 SPI clock cycles (done by writing 0xFF 10 times) Set card select low Send CMD0 [0x400000000095] and Loop up to 8 times waiting for high bit on response to go low R1 = 0x01 (idle) Send CMD8 [0x40000001AA87] and Loop up to 8 times waiting for high bit on response to go low R1 = 0x7F (??? My loop shows the responses for each iteration and I got 0xFF 0xFF 0xC1 0x7F... is the card getting out of sync?) Send CMD58 [0x7A00000000FD] and Loop up to 8 times waiting for high bit on response to go low R1 = 0x01 (idle and back in sync) Send 0xFF 4 times to read OCR OCR = 0x00FF80 Send CMD55 [0x770000000065] (1st part of ACMD41) and Loop up to 8 times waiting for high bit on response to go low R1 = 0x5F (??? loop responses are 0xFF 0xFF 0xF0 0x5F... again out of sync?) Send CMD41 [0x6900000000E5] (2nd part of ACMD41) and Loop up to 8 times waiting for high bit on response to go low R1 = 0x05 (idle and illegal command, but back in sync???) Because illegal command, assume card is MMC Send CMD1 [0x4100000000F9] (for MMC) and Loop up to 8 times waiting for high bit on response to go low R1 = 0x7F (??? loop responses are 0xFF 0xFF 0xC1 0x7F... again out of sync?) Repeat CMD1 and Loop up to 8 times waiting for high bit on response to go low R1 = 0x01 (idle) Repeat CMD1 and Loop up to 8 times waiting for high bit on response to go low R1 = 0x7F (??? loop responses are 0xFF 0xFF 0xC1 0x7F... again out of sync?) Repeat CMD1 and Loop up to 8 times waiting for high bit on response to go low R1 = 0x00 (out of idle) Send CMD9 [0x4900000000AF] (get CSD) and Loop up to 8 times waiting for high bit on response to go low R1 = 0x3F (??? loop responses are 0xFF 0xFF 0xC1 0x3F... again out of sync?) Code craps out because Illegal command bit is high. WTF is wrong with that card? Sometimes in sync, other times not. (The above pattern is repeatable.) I've scoped this one out and I'm not seeing any rogue clock cycles going through between MOSI/MISO transfers. Anyone have any clues? Need any more info? Thanx in advance for spending the time to read through all of this.

    Read the article

  • how to get Celsius as output from LM335Z with arduino?

    - by wizztjh
    the firstsensor is my lm335z output. int firstSensor = 0; int secondSensor = 0; int thirdSensor = 0; int inByte = 0; void setup() { Serial.begin(9600); establishContact(); // send a byte to establish contact until receiver responds } void loop() { if (Serial.available() > 0) { inByte = Serial.read(); firstSensor = analogRead(0); delay(10); secondSensor = analogRead(1); thirdSensor = analogRead(2); Serial.print(firstSensor, DEC); Serial.print(","); Serial.print(secondSensor, DEC); Serial.print(","); Serial.println(thirdSensor, DEC); } } void establishContact() { }

    Read the article

  • a pdf reader - please guide - a step by step guidence - reference to guidence-

    - by user287745
    have to make a hardware project using micro controller, memory, screens, etc. is it possible to make an independent .dpf / documents reader, which is capable of running on battery power.? please note dont want to use any technology which needs licensing all free wares readers etc and programing say assembly and c or flash or any. please help, have submitted proposal of pdf reader project (independent hardware), many say its impossible, wht should i do??

    Read the article

1 2 3 4 5  | Next Page >