Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Recent content by Mity Eltu

  1. Mity Eltu

    Single Data Type Rounding Error

    No, you can have more than one single in a program. The number of singles might be limited due to their size (32 bits), but as long as there is space, you can have as many as you want. If you are going to scale them up by 1000, you will need to make sure that the data type you have selected for...
  2. Mity Eltu

    High Side Transistor Switch

    Yes, a low side switch would also work. I have several of those also on small breakout boards, but it is safer to work on the down stream equipment with a high side switch. That's the only reason... well, that and to see if I could actually design one that worked. As far as the diode: I...
  3. Mity Eltu

    High Side Transistor Switch

    I have built a 2 transistor switch to be used on the high-side of a 24V DC relay (Circuit is attached). I have tested it and it works great, but I have a question. With regard to the diode across the relay. Does the diode need to be physically directly across the relay coil? Is it acceptable for...
  4. Mity Eltu

    SD Card and SPI Communications

    OK. Got a reply from Vladimir. The current configuration of the SD Card commands and the SPI module precludes operation of both at the same time. In other words, you can't use the SD Card commands and then turn around and use the SPI module for other communications. That's sad. That...
  5. Mity Eltu

    Single Data Type Rounding Error

    I understand, from the big picture kind of perspective, how this single precision stuff works, but these numbers are all well within the 7 significant digit representation. The compiler, for whatever reason, rounds everything down, so that 0.284999 comes to be 0.284 when the decimal places is...
  6. Mity Eltu

    Single Data Type Rounding Error

    I am using a single data type variable to take a running average of four numbers. I made this really simple so I could verify that it is doing what it is supposed to do, but I find it doesn't do what I think it should. Here's the code: '18F4520 'LCD Configuration - 4-bit lower Define LCD_LINES...
  7. Mity Eltu

    SD Card and SPI Communications

    Zoiks. Well, while this is not really a bug, it is certainly not documented and is rather inconvenient. After toying with this for a number of hours, arranging and rearranging the various commands I found that as long as all the sd card initialization commands AND all the open, write, append...
  8. Mity Eltu

    SD Card and SPI Communications

    Ok, the 2 chip solution works. I have a 18F4550 grabbing data from the max6675 and sending via spi to a 18F4520 via USART. The 18F4520 stores the data on an SD Card in SPI mode and displays the data on an LCD. This is ok. Not great, but workable. However, now a new issue is up. I apparently...
  9. Mity Eltu

    SD Card and SPI Communications

    Yeah, I'm making sure the chip can handle the code size. It seems if I am going to use a single chip solution that I'm going to have to use a different compiler. I cringe at the thought. I may just bite the bullet and use the 2 chip solution I mentioned above. I am not at work yet, so I don't...
  10. Mity Eltu

    SD Card and SPI Communications

    Ok. Finished coding 2 separate programs for 2 separate chips: 18F4550 is grabbing the data from the MAX6675 and sending via USART to 18F4520. The 18F4520 receives the data from the USART, converts it to °C and displays it on the LCD. I'll work on getting that data into the SD card tomorrow. Too...
  11. Mity Eltu

    SD Card and SPI Communications

    I have been thinking. I can find no way to force the SPI module to work with both the SD card and a separate peripheral that uses SPI communications. Something about the differing setups wil not allow them to work at the same time. I tried al kinds of combinations of the code to try to force it...
  12. Mity Eltu

    18F2431 CLKO

    I think maybe you misunderstood what he typed. Port A6 is used as an output for the clock if INTIO1 is used. This will not interfere with the function of Port C6 or C7. These pins can still be used as tx/rx.
  13. Mity Eltu

    SD Card and SPI Communications

    OK, WOW. I just finished readin a ton of stuff on SPI commincations and there is no way I am gouing to be able to bitbang an spi platform that will permit me to write a CSV file onto this sd card. Frankly, I aint smart enough for that. I'm going to submit a possible bug report to vladimir and...
  14. Mity Eltu

    SD Card and SPI Communications

    OK, Attached is the code I am using. It does very little at the moment, but it does recognize the SD card. I have another program that I have used that is similar to this that will write the data into a CSV text file. This is a stripped down version of that one. The problem now is that the...
  15. Mity Eltu

    SD Card and SPI Communications

    I'll try this when I get back to work Monday. I'll post the segments of code that work independently and then try to use them other. Hopefully the SPI will work with the sd card AND the thermocouple in the same circuit. Thanks for the advice.

Latest threads

New Articles From Microcontroller Tips

Back
Top