Announcement

Collapse
No announcement yet.

Using External SPI port and MicroSD together ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Zonker
    replied


    All excellent stuff guys..!! Matt B. (one of the engineering guys at work) also found anouther IC from Maxim tha can handle many different type of input type sensors.



    http://datasheets.maxim-ic.com/en/ds/MAX31855.pdf#page3



    I tried to atached the PDF for anyone to look at... but is to big



    Thank you all for the "C" code help !!!



    jea

    Leave a comment:


  • 4DSysFan
    replied


    You could run the chip select pins to a '138..... Then three pins could be used to generate eight mutually exclusive chip select lines.....

    Leave a comment:


  • engicoder
    replied


    I used 4 MAX6675 simultaneously using a separate IO line for each chip select. The problem you run into on the PICASO is the limited number of general purpose IO lines, but this can be overcome using the bus pins as chip select. In this way you could have up to 8 chip select devices on an bit banged spi line. My previous example code was a simplified version to demonstate a single line.



    Ben

    Leave a comment:


  • meldavia
    replied


    Iteresting points from both of you,
    theoretically, if device chip select is shared (or more to the point disabled while alternative devices are accessed)
    ,......all should work seamlessly.
    Seems like zonker got it working, so gladly theory spills over into reality,
    Please keep us posted on your success

    Leave a comment:


  • Zonker
    replied


    NICE..!! I got it working...


    Attached files .jpg]

    Leave a comment:


  • Zonker
    replied


    Excellent..!! Thanks for the help in getting me started up. I wanted to let everyone know on the forum that if I can be of any help, I will.!! I am kind of a hardware guy but have my own copy of Eagle CAD pro and can work up any kind of add-on board we need for the display units. I have attached a sample of a recent LCD display board I did up for a battery pack testing machine at work.



    Maybe we can work up several types of "standard" 4D display interface boards that just "plug in" to the units making things easier for everyone. If you think this is a good thing, maybe we could open a new thread in the forum, and start gathering data on what people want, and crank out a few boards to use. I could post the output board design data so anyone could get there hands on it...



    Just a thought.... Thanks again engicoder..!!



    jea


    Attached files

    Leave a comment:


  • engicoder
    replied


    You need to declare the each parameter and then pass it during the function call. Here is a simple example which does something along the lines of what you were trying to do.






    Attached files max6675-test.4dg (655 B)

    Leave a comment:


  • Zonker
    replied


    Thanks engicoder for the code sample..! I was trying to get the data out of the declared var's that are used but keep getting the var not declared error when compiling... I setup a 1 sec timer to make the call to the MAX6675_Read function, but then can't get the data... I'm sure this is a "Noob" C coding problem with me not knowing enough yet thing... when you get time, could you write a sample snipet showing how to get the data from the var's...?



    A big thank you in advance for your time my frend..!!!



    I commented out the lines giving me errors here...



    func read_ic_data()
    sys_SetTimer(TIMER0,1000); // read IC every second
    if (MAX6675_Read) // Read temp IC, Returns 1 if OK
    //CHT1_Value := pTempDegrees; // update Temp Value
    txt_MoveCursor(19,1); // reset cursor to line 19, column 1
    //print ([DEC2]pTempDegrees); // Print it on screen
    txt_MoveCursor(20,1); // reset cursor to line 20, column 1
    print ("good ");
    else
    txt_MoveCursor(20,1); // reset cursor to line 20, column 1
    print ("error");
    endif
    endfunc

    Leave a comment:


  • engicoder
    replied


    Here is the simple lib I used with the MAX6675. I hope it helps. It should be renamed to max6675.lib. This forum doesn't allow files with a .lib extension to be uploaded, so I had to rename it.






    Attached files max6675.4dg (4 KB)

    Leave a comment:


  • Atilla
    replied


    Jea, thanks for the kind words . There's a lot happening here at 4D, more new products, more new tools and bezels for many of the displays is on top of the list. Won't be too long now, we're hoping for a February release.

    Leave a comment:


  • Zonker
    replied


    Sweet...! I just got 4 of the IC's in today from Digi-key (ouch.. $14 a copy) and will be mounting two of them to a converter board so I can play around with them. I would like to them read on a timer based ISR and maintain the "C" and "F" numbers automatically so I could just read the most current answers when needed. Not sure what the magic line of code to properly get the bits arranged and converted to the needed output var's yet... I did get a little time to skim over the PDF for the chip. Bit 2 detects an open sensor circuit and is an important feature to include... (nice)



    Thanks for trying this out ahead of time..!!!



    I am trying to get this setup to monitor engine temps and would like to add on things like RPM and battery voltage ect... I was also thinking of maybe making this thing in two parts. Ma be a "Potted Module" type of thing next to the engine, connected to all the sense points, with a cheap MCU (PIC Z8..) and have that module provide power and serial com back to the 4D Display device with a simple "Phone Jack" type wire. Still looking things over.... I am kinda of a NUB when it comes to "C" code, But everyone has good examples to look at in the forum which makes things easier...



    Now if 4D starts offering some display mounting frames for there units, I could get the the casing work started, and maybe this thing will start coming together..!!!



    Thanks 4D for creating a "Kick-Ass" product line..!!

    You guys are helping everyone create mini-GUI stuff that looks good..!!



    jea

    Leave a comment:


  • engicoder
    replied


    A little late to the party, but I bit banged a the MAX 6675 without any problems using the general IO pins IO2, IO3 and IO4

    Leave a comment:


  • Zonker
    replied


    Yep, Sounds like a good way to get it done... I dont need a rapid repeat rate on the temps coming in anyway. You gentelman did a geate job doing the 4D Visi addon to the IDE software.! It's got me wondering what the GUI radio button is going to do... (nice) Keep up makeing more wigets, They look and work great..!!



    jea

    Leave a comment:


  • meldavia
    replied


    Not sure how fast or frequent you need to get updates from the MAX6675's
    but it might be a better proposition to bit bang an SPI port with other pins.
    That way you dont need to modify the board, and there will be no contention
    between you hardware readings and the uSD card functions.

    Leave a comment:


  • Zonker
    replied


    You bet Sinanaknar ! next paycheck that comes around, the order will be in you in box..! would still like to use the SPI port externaly... anyone tried this..?

    Leave a comment:

Working...
X