Search Results

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

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

  • PIC 18 controller as serial to ethernet bridge

    - by Surjya Narayana Padhi
    Hi Geeks, I am planning to use PIC18F6*** serial microntroller for my project serial-ethernet converter. Once I will put my hex code in PIC micro-controller for send recieve serial port data I will use the windows hyper-terminal and for checking the ethernet data is there any application in windows? If my question is not clear I am ready to explain it better... please let me know.....

    Read the article

  • How can I reprogram a USB "easy button"?

    - by Shawn Simon
    I have a USB "easy button"- is a USB cable attached to a large button. It appears as a keyboard to the computer. When I push the button, it sends the keys Start+R and then quickly types in a pre-configured URL. I am fairly certain that the company that produces these buttons sets the URL via some sort of software over USB. How could I reprogram the button myself? What sort of software would I need? Here is a link to the website: http://www.usbsmartbuttons.com/

    Read the article

  • Declaration of arrays before "normal" variables in c?

    - by bjarkef
    Hi We are currently developing an application for a msp430 MCU, and are running into some weird problems. We discovered that declaring arrays withing a scope after declaration of "normal" variables, sometimes causes what seems to be undefined behavior. Like this: foo(int a, int *b); int main(void) { int x = 2; int arr[5]; foo(x, arr); return 0; } foo sometimes is passed a pointer as the second variable, that does not point to the arr array. We verify this by single stepping through the program, and see that the value of the arr variable in the main scope is not the same as the value of the b pointer variable in the foo scope. And no, this is not really reproduceable, we have just observed this behavior once in a while. Changing the example seems to solve the problem, like this: foo(int a, int *b); int main(void) { int arr[5]; int x = 2; foo(x, arr); return 0; } Does anybody have any input or hints as to why we experience this behavior? Or similar experiences? The MSP430 programming guide specifies that code should conform to the ANSI C89 spec. and so I was wondering if it says that arrays has to be declared before non-array variables? Any input on this would be appreciated.

    Read the article

  • SD card initialization SPI

    - by Openavr
    Hi People I saw a lot of infos about MMC/SD cards and I tried to make a lib to read this.. (modifying the Procyon Avrlib) But I have some problems here. I Don´t change the original code and tried here. My problem is about the init of SD card. I have 2 here, a 256mb and another 1GB. I send the init commands like this order: CMD0, CMD55, ACMD41, CMD1 But SD 256mb returns me only 0x01 response for each command.. the CMD1 i send a lot of times, SD 256mb always returs only 0x01.. never 0x00. The SD 1GB is more crazy... CMD0 returns with 0x01 ..nice but the CMD55 response with 0x05... another times responde with 0xC1... and another ones response 0xF0 with a 0x5F in the next interation... Around internet have infos and examples, but a bit of confused. Here in my project, I must use 1GB card and I´m trying with a MicroSD with a SD Adapter (I think that this is not the problem). Please any help are apreciate! Regards PS - my problem like the problem from this guy http://stackoverflow.com/questions/2365897/initializing-sd-card-in-spi-issues but his solution don´t solved my problem.. The SD1GB returns only 0x01 ever... :cry:

    Read the article

  • AVR Analog Comparator + Internal Pullup?

    - by vicatcu
    I have what I hope is a simple question pertaining to the Atmel AVR microcontrollers. So I want to use the ATTiny85's Analog Comparator to determine if a signal is above or below a threshold. This signal is normally "floating" and grounded when "active" (i.e. it's an active low - open collector signal). If I enable the pullup on the input pin (which is also the comparator input) by doing: DDRB = 0x00; // DDRB.1 = 0 = input PORTB = 0xFF; // PORTB.1 = 1 = internal pullup enabled If i use the analog comparator and select PORTB.1 as AIN1 will the internal pullup be applied to my input signal? I'm hoping someone has personal experience to verify this behavior. Hope this question isn't too 'hardware-oriented' for stack-overflow. Thanks!

    Read the article

  • Robust and easy to implement serial bus (automotive application)

    - by JcMaco
    What serial communication bus would you use in a automotive embedded system if your main selection criteria were: * Electrically robust * Slow speed (32 kb/s) * Easy to program * Easy to interface with microcontrollers It won't be transferring much data, but it will need to be transferred periodically at high speed (100 - 500 Hz). I find that RS-232 is just not reliable enough if you have noise in your ground line. CAN-bus seems interesting, but I have no experience with it. We are currently interested in a combination of AVR AT90CAN128 microcontrollers.

    Read the article

  • Hex Decompilers for PIC

    - by Chathuranga Chandrasekara
    I've faced to a problem with a PIC Micro controller. I have a micro-controller programmed by me long time ago and I lost the relevant source code and the schematic diagrams. Now I need to invert the value of a port. I can do this using some NOT gates but it is a big hassle to do so. or alternatively I will need to write the whole program back. I don't expect to see the code back in PIC C or MikroC. Having an understandable assembly code would be sufficient. So do anyone has any experience on a good HEX decompiler that I can use for this purpose? Any comments based on your experience? :)

    Read the article

  • How to make a scroller on a micro-processor/-controller?

    - by Louise
    I would like to write a text scroller on a micro-processor with 4 5x7 displays in ANSI-C. Does anyone know of example source code or anything that can help me get started? Update This is the user manual for the micro-processor board I have. On PDF page 17 is a picture of the board with the displays. The code is written in an IDE called "zds2_Z8Encore493.exe" and then flashed to the micro-controller over serial port. I would like the text to cascade from one to the next to the next column-by-column, so it is smooth.

    Read the article

  • Writing Device Drivers for Microcontrollers, where to define IO Port pins?

    - by volting
    I always seem to encounter this dilemma when writing low level code for MCU's. I never know where to declare pin definitions so as to make the code as reusable as possible. In this case Im writing a driver to interface an 8051 to a MCP4922 12bit serial DAC. Im unsure how/where I should declare the pin definitions for The CS(chip select) and LDAC(data latch) for the DAC. At the moment there declared in the header file for the driver. Iv done a lot of research trying to figure out the best approach but havent really found anything. Im basically want to know what the best practices... if there are some books worth reading or online information, examples etc, any recommendations would be welcome. Just a snippet of the driver so you get the idea /** @brief This function is used to write a 16bit data word to DAC B -12 data bit plus 4 configuration bits @param dac_data A 12bit word @param ip_buf_unbuf_select Input Buffered/unbuffered select bit. Buffered = 1; Unbuffered = 0 @param gain_select Output Gain Selection bit. 1 = 1x (VOUT = VREF * D/4096). 0 =2x (VOUT = 2 * VREF * D/4096) */ void MCP4922_DAC_B_TX_word(unsigned short int dac_data, bit ip_buf_unbuf_select, bit gain_select) { unsigned char low_byte=0, high_byte=0; CS = 0; /**Select the chip*/ high_byte |= ((0x01 << 7) | (0x01 << 4)); /**Set bit to select DAC A and Set SHDN bit high for DAC A active operation*/ if(ip_buf_unbuf_select) high_byte |= (0x01 << 6); if(gain_select) high_byte |= (0x01 << 5); high_byte |= ((dac_data >> 8) & 0x0F); low_byte |= dac_data; SPI_master_byte(high_byte); SPI_master_byte(low_byte); CS = 1; LDAC = 0; /**Latch the Data*/ LDAC = 1; }

    Read the article

  • Explain why MickroC pic18f4550 HID example works

    - by Dr Deo
    MickroC compiler has a library for HID(Human Interface Device) usb communication. In the supplied samples, they specify that the buffers below should be in USB ram and use a pic18f4550. unsigned char readbuff[64] absolute 0x500; // Buffers should be in USB RAM, please consult datasheet unsigned char writebuff[64] absolute 0x540; But the pic18f4550 datasheet says USB ram ranges from 400h to 4FFh So why does their example work when their buffers appear not to be between 400h to 4FFh? Link to full source

    Read the article

  • Negative number representation across multiple architechture

    - by Donotalo
    I'm working with OKI 431 micro controller. It can communicate with PC with appropriate software installed. An EEPROM is connected in the I2C bus of the micro which works as permanent memory. The PC software can read from and write to this EEPROM. Consider two numbers, B and C, each is two byte integer. B is known to both the PC software and the micro and is a constant. C will be a number so close to B such that B-C will fit in a signed 8 bit integer. After some testing, appropriate value for C will be determined by PC and will be stored into the EEPROM of the micro for later use. Now the micro can store C in two ways: The micro can store whole two byte representing C The micro can store B-C as one byte signed integer, and can later derive C from B and B-C I think that two's complement representation of negative number is now universally accepted by hardware manufacturers. Still I personally don't like negative numbers to be stored in a storage medium which will be accessed by two different architectures because negative number can be represented in different ways. For you information, 431 also uses two's complement. Should I get rid of the headache that negative number can be represented in different ways and accept the one byte solution as my other team member suggested? Or should I stick to the decision of the two byte solution because I don't need to deal with negative numbers? Which one would you prefer and why?

    Read the article

  • Where can I find soft-multiply and divide algorithms?

    - by srking
    I'm working on a micro-controller without hardware multiply and divide. I need to cook up software algorithms for these basic operations that are a nice balance of compact size and efficiency. My C compiler port will employ these algos, not the the C developers themselves. My google-fu is so far turning up mostly noise on this topic. Can anyone point me to something informative? I can use add/sub and shift instructions. Table lookup based algos might also work for me, but I'm a bit worried about cramming so much into the compiler's back-end...um, so to speak. Thanks!

    Read the article

  • Efficient implementation of natural logarithm (ln) and exponentiation

    - by Donotalo
    Basically, I'm looking for implementation of log() and exp() functions provided in C library <math.h>. I'm working with 8 bit microcontrollers (OKI 411 and 431). I need to calculate Mean Kinetic Temperature. The requirement is that we should be able to calculate MKT as fast as possible and with as little code memory as possible. The compiler comes with log() and exp() functions in <math.h>. But calling either function and linking with the library causes the code size to increase by 5 Kilobytes, which will not fit in one of the micro we work with (OKI 411), because our code already consumed ~12K of available ~15K code memory. The implementation I'm looking for should not use any other C library functions (like pow(), sqrt() etc). This is because all library functions are packed in one library and even if one function is called, the linker will bring whole 5K library to code memory.

    Read the article

  • error msg in avr studio4

    - by shubhang
    i have recently purchased an AVR USB programmer from robokits.co.in, was trying to program atmeg8 using AVR studio4 and i get the following when i click on the program options: a problem occurred when executing the command. make sure u are using the correct programming method. current mode is ISP verify that the device is placed in the correct socket, and that the ISP cable is connected properly.check that the programming frequency specified in the main page is well below 1/4th of the clock frequency of the device. i have tried all that i could think of, i have checked the connections and the freq is below 1/4th of the device. but that doesn't solve this problem i have made the circuit for blinking LEDs program please help me out see the image for details thanking you

    Read the article

  • Count seconds and minutes with MCU timer/interrupt?

    - by arynhard
    I am trying to figure out how to create a timer for my C8051F020 MCU. The following code uses the value passed to init_Timer2() with the following formula: 65535-(0.1 / (12/2000000)=48868. I set up the timer to count every time it executes and for every 10 counts, count one second. This is based on the above formula. 48868 when passed to init_Timer2 will produce a 0.1 second delay. It would take ten of them per second. However, when I test the timer it is a little fast. At ten seconds the timer reports 11 seconds, at 20 seconds the timer reports 22 seconds. I would like to get as close to a perfect second as I can. Here is my code: #include <compiler_defs.h> #include <C8051F020_defs.h> void init_Clock(void); void init_Watchdog(void); void init_Ports(void); void init_Timer2(unsigned int counts); void start_Timer2(void); void timer2_ISR(void); unsigned int timer2_Count; unsigned int seconds; unsigned int minutes; int main(void) { init_Clock(); init_Watchdog(); init_Ports(); start_Timer2(); P5 &= 0xFF; while (1); } //============================================================= //Functions //============================================================= void init_Clock(void) { OSCICN = 0x04; //2Mhz //OSCICN = 0x07; //16Mhz } void init_Watchdog(void) { //Disable watchdog timer WDTCN = 0xDE; WDTCN = 0xAD; } void init_Ports(void) { XBR0 = 0x00; XBR1 = 0x00; XBR2 = 0x40; P0 = 0x00; P0MDOUT = 0x00; P5 = 0x00; //Set P5 to 1111 P74OUT = 0x08; //Set P5 4 - 7 (LEDs) to push pull (Output) } void init_Timer2(unsigned int counts) { CKCON = 0x00; //Set all timers to system clock divided by 12 T2CON = 0x00; //Set timer 2 to timer mode RCAP2 = counts; T2 = 0xFFFF; //655535 IE |= 0x20; //Enable timer 2 T2CON |= 0x04; //Start timer 2 } void start_Timer2(void) { EA = 0; init_Timer2(48868); EA = 1; } void timer2_ISR(void) interrupt 5 { T2CON &= ~(0x80); P5 ^= 0xF0; timer2_Count++; if(timer2_Count % 10 == 0) { seconds++; } if(seconds % 60 == 0 && seconds != 0) { minutes++; } }

    Read the article

  • pointers in C with a #define

    - by milan
    The function: #define ASSOC(port) (*(volatile bit_field *) (&port)) The function call: #define SCLK ASSOC(PORTC).bit0 bit_field defined as a struct like this: typedef struct { unsigned char bit0 :1, bit1 :1, bit2 :1, bit3 :1, bit4 :1, bit5 :1, bit6 :1, bit7 :1; } bit_field; I don't know where &port is defined. Can someone please explain how the function is read and how it works please? I am not very good with pointers and this example in particular is very confusing with "*" in the front and at the end and the "&" with the port. Thank you

    Read the article

  • How to Use PortT( ie GPIO) of MC9S12XDP512 microcontroller in MPC860 microprocesser code ?

    - by sagar
    Hi, Can u please guide me, how to access GPIO's of MC9S12XDP512 microcontroller in MPc860 microprocesser. In project MC9S12XDP512 microcontroller is connected with MPC860 mp through one connector, means we can have facility to access any registers from microntroller to microprocesser and vice versa by use of IMMR or CPM feathers. But i dont know how to use that to access resisters in MPC860. But i wish to use one gpio of MC9S12XDP512 microntroller in MPC860 code ( in C langanuge) to do some other operations. Please let me know if you have idea.

    Read the article

  • How to build up a lookup table in microcontroller?

    - by GiGi
    Hi, I am so confused about how to build up a 3-dimension lookup table. Is the template as follows: create a 3 dimensional array to store data. Then create linked list. Then create function 'insert' to put all the data into the array? As some book said, linked list should be static const, is it need to create another function to expand the list? Because the lookup table should be used in a microcontroller, it only needs to finish the operation of putting the data into the array and whenever want to find the data, it will be fast and easy to search. Could you help me with that and give me some suggestions? Thank you.

    Read the article

  • Connecting to MSP430 via /dev/ttyACM0

    - by speciousfool
    I'd like some suggestions about how to fix garbled serial output from a device connected on /dev/ttyACM0. Lately I've been working on a development project making use of TI's MSP430 microcontroller (specifically the eZ430-RF2560). Over on this thread you can see we've been testing some code and have found that the output of the microcontroller over serial is garbled. The btstack provides simple counter test program. When we run the program and look at the serial port output using PuTTY on Windows 7 we see: rfcomm_send_internal cid 117 doesn't exist! BTstack counter 26230 rfcomm_send_internal cid 117 doesn't exist! BTstack counter 26231 However if we connect from various Ubuntu clients we get something like: Stt.R. BTacn 0 BTacn 002BTacn 0 BTcct 04BTtacoe 5BTacun My current belief is that this is because the device is being detected by cdc_acm as a generic USB ACM device. Another thread about a similar microcontroller suggests that the device should use a specific usb serial driver. We've verified that the module is compiled on our system and did a "modprobe ti_usb_3410_5052" but this had no effect on cdc_acm. Here is the relevant section of the kernel's debug log: [ 2735.092987] usb 2-1.2: new full speed USB device number 5 using ehci_hcd [ 2735.213655] cdc_acm 2-1.2:1.0: This device cannot do calls on its own. It is not a modem. [ 2735.213669] cdc_acm 2-1.2:1.0: No union descriptor, testing for castrated device [ 2735.213720] cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device [ 2745.241996] generic-usb 0003:0451:F432.0003: usb_submit_urb(ctrl) failed [ 2745.242023] generic-usb 0003:0451:F432.0003: timeout initializing reports [ 2745.242401] generic-usb 0003:0451:F432.0003: hiddev0,hidraw0: USB HID v1.01 Device [Texas Instruments Texas Instruments MSP-FET430UIF] on usb-0000:00:1d.0-1.2/input1 So, in summary, we'd like to figure out how to properly connect to this device. Also of use may be the appropriate place to file a bug report.

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >