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.
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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.
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...
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...
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.