Jump to content
sparkdrummer

The Compact Computer 40 (CC40)

Recommended Posts

We need a clearer graphic about wiring orientation if someone wants to make it (and is good at graphics).  I even got confused. :)

 

Share this post


Link to post
Share on other sites
12 minutes ago, brain said:

I have found that the Arduino build sometimes hangs during the init of the DS1307 RTC (the Arduino code assumes a DS3231 RTC, while the native code has a driver for both).  I tried to compile in the Arduino IDE for no clock, but got the same issue as you.

 

I compiled two versions of the code for the arduino HW using the native make system, which works for me.  If you are using the original wiring (LED on D2), then download and flash the _nopm.hex version (No Power Management).  Otherwise, flash the other version, and let us know (or pop into Discord and we can troubleshoot real time).

 

The issue is that once I flash the native code, it appears to configure the DS1307 so that a subsequent run with the Arduino code (from the sreid_mods branch of my repo, but I am sure the #519 as well) will work.  So, testing is hampered in that way.

 

http://www.go4retro.com/downloads/HEXTIr/

 

I will try to find a way to compile the Arduino sketch without the clock so it will work on these DS1307 shields (or just add the code to support the 1307 in the sketch.

 

Jim

Ok will give it a shot. How do you upload a HEX file to the Arduino though? The IDE won't let me do it...

Share this post


Link to post
Share on other sites

Grab a copy of avrdude for your platform:

 

Windows: http://download.savannah.gnu.org/releases/avrdude/avrdude-6.3-mingw32.zip

Linux/MacOS: http://download.savannah.gnu.org/releases/avrdude/avrdude-6.3.tar.gz

 

Install

 

from a command prompt, run something like this (replace HEX file name and COM port)

 

avrdude -p atmega328p    -c arduino -P COM6 -U flash:w:obj-m328p-arduino/HEXTIr.hex

 

COM Port is the one the Arduino IDE uses, and the HEX filename is whatever you saved it as.

Share this post


Link to post
Share on other sites

So I'm getting a missing DLL error with avrdude.

Too much trouble, so I just switched around the BAV and LED wires and presto, it now works fine :)

As Acadiel said, you have way too many branches and forks and whatnot on the GitHub, which is pretty confusing. Is there a reason why there can't be just one main branch with the latest information? I'm just a simple guy :lol:

In any case, many thanks to brain and everyone else who helped on this project: this has been a wish of mine for a very long time, and it is now reality!

By the way, how do you read the directory after doing a OLD "100.$"? All I get is a blank when I list... And what other functions are available outside loading and saving?

Share this post


Link to post
Share on other sites

On my Windows10 64bit PC with the Arduino IDE installed this work without the download of avrdude because it is part of the IDE. Choose the right parameter for the COM-port:

 

"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude" -v -V -carduino -patmega328p -C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -PCOM4 -b115200 -D -Uflash:w:HEXTIr_arduino_hw_nopm.hex

 

And the drive work: OLD, SAVE, VERIFY and OLD "100.$" are OK

Share this post


Link to post
Share on other sites
Posted (edited)

Hmmm.  Well, let me unpack that:

 

There is one place for releases:  http://www.go4retro.com/downloads/HEXTIr/

 

If you're grabbing files from the git repos, you're puling development snapshots, where forks and branches are common and preferred.  There's a reason why there are so many.

 

A month or so ago, Acadiel put me in touch with Stephen, who works at TI and worked on some of these units.  He expressed interest and took an immediate set of actions to add functionality to the system.  But, his work changed a ton of items in the main area, so a branch was created.  As well, his code only compiled with the Arduino IDE, not the native compile.

 

As well, Manfred also started working on the code, to fix some TI74 items, but he was using the main branch of the code, so the main branch was kept to support his efforts.

 

That's the only 2 branches I'm aware of in my repo.

 

Due to the way GIT works, each of those folks have their own repositories.  That's not something I can control.  I offered a link to Reid's repo, because his is known working with the Arduino IDE.

 

This is not a released/finished/completely working solution.  I worked on it initially years ago, but there was little interest.  Now that interest has increased, the development team is working toward a release, once we can merge all of the reid and Manfred items into 1 codebase and clean up some of the dependencies, but this is common for under development projects.

 

If you're overwhelmed by the development snapshots and multiple branches, I'd suggest working to get avrdude running and then use the known working HEX files on the downloads site.

 

I''ll answer your other questions in a different response.

 

Jim

 

 

Edited by brain
added text

Share this post


Link to post
Share on other sites

The newly updated HEX files on the downloads page support OLD, SAVE, catalog, and they support the serial device as well as the printer device.  Obviously, testing is needed, as I am sure bugs are still around.

 

Jim

 

Share this post


Link to post
Share on other sites

Yup, since I hardly ever use Github (I am not a programmer by trade, only a hobbyist), I indeed find it very confusing, not to mention that this thread has multiple links to different branches and I was not sure which one was the latest and greatest. 

In any case, thanks again for all the work you put into this.

Share this post


Link to post
Share on other sites
57 minutes ago, KlausO said:

On my Windows10 64bit PC with the Arduino IDE installed this work without the download of avrdude because it is part of the IDE. Choose the right parameter for the COM-port:

 

"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude" -v -V -carduino -patmega328p -C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -PCOM4 -b115200 -D -Uflash:w:HEXTIr_arduino_hw_nopm.hex

 

And the drive work: OLD, SAVE, VERIFY and OLD "100.$" are OK

Thanks for the tip! 

So how do you read the directory after OLD "100.$"?

 

Share this post


Link to post
Share on other sites

What code is in your device (from what repo/branch/download?)

 

I'm assuming it's the arduino code, and from my sreid_mods.  If so, I am still trying to get Manfred's CATALOG functionality to work in that branch.  (we have to merge it from the master into there), and then I can bring all of the sreid_mods into the master branch.

 

If it's from my downloads dir, those should work (just tested)

 

Jim

Share this post


Link to post
Share on other sites
2 hours ago, brain said:

What code is in your device (from what repo/branch/download?)

 

I'm assuming it's the arduino code, and from my sreid_mods.  If so, I am still trying to get Manfred's CATALOG functionality to work in that branch.  (we have to merge it from the master into there), and then I can bring all of the sreid_mods into the master branch.

 

If it's from my downloads dir, those should work (just tested)

 

Jim

I have been unable to run avrdude on my computer for the life of me. I fixed the missing DLL issue but the program still won't run and gives me an application error.

KlausO's method also does not work because the command shell is choking on the C:\Program Files (x86) bit...

Do you happen to have the source code for the hex file which I can compile in the Arduino IDE? Why the latter simply does not include an option to directly load a hex file is a frustrating mystery...

Share this post


Link to post
Share on other sites
I have been unable to run avrdude on my computer for the life of me. I fixed the missing DLL issue but the program still won't run and gives me an application error.
KlausO's method also does not work because the command shell is choking on the C:\Program Files (x86) bit...
Do you happen to have the source code for the hex file which I can compile in the Arduino IDE? Why the latter simply does not include an option to directly load a hex file is a frustrating mystery...
The ide includes avrdude.. look in it's folder structure

Sent from my LM-V600 using Tapatalk

Share this post


Link to post
Share on other sites

You have the source code for the hex file which compiles in the IDE (it's the tip of sreid_mods), but that one has issues unless you're using the exact same config as Stephen Reid (he uses a separate DS3231 RTC).  I am working to merge the native code back into the arduino sketch version, but it's not done yet.

 

Jim

 

Share this post


Link to post
Share on other sites

OK so I finally got avrdude to work and I successfully flashed the arduino. The bad news is that now I get IO ERROR 6 with saves and IO ERROR 3 with reads. I used the HW version of the HEX files, not the nopm one because I already switched the wires.

When I go back to the reid source files, it works fine minus the directory command.

I think I'm just going to wait for the merge to happen. Still very happy to have the save and load functions going at least :)

 

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Actually, this is something we should test, if you're willing.  It sounds like a FAT Library thing, as error 3 is "file not found" and 6 is "Device Error", which are both indicative of the write protect tab being set or the disk not being readable with the library:

 

        case FR_RW_ERROR:
          rc = HEXSTAT_DEVICE_ERR; // 6
          break;

        case FR_EXIST:
        case FR_DENIED:
        case FR_IS_DIRECTORY:
        case FR_NO_PATH:
        default:
          rc = HEXSTAT_NOT_FOUND; // 3
          break;

I wonder if the WP wire is having issues, or if the WP tab is set to WP.  I can make a special build that splits out the various errors, if you're up for testing.

 

Or, try another SD card and see if it works.

Edited by brain
additions

Share this post


Link to post
Share on other sites
1 hour ago, brain said:

Actually, this is something we should test, if you're willing.  It sounds like a FAT Library thing, as error 3 is "file not found" and 6 is "Device Error", which are both indicative of the write protect tab being set or the disk not being readable with the library:

 

        case FR_RW_ERROR:
          rc = HEXSTAT_DEVICE_ERR; // 6
          break;

        case FR_EXIST:
        case FR_DENIED:
        case FR_IS_DIRECTORY:
        case FR_NO_PATH:
        default:
          rc = HEXSTAT_NOT_FOUND; // 3
          break;

I wonder if the WP wire is having issues, or if the WP tab is set to WP.  I can make a special build that splits out the various errors, if you're up for testing.

 

Or, try another SD card and see if it works.

Sure, happy to. I don't think the SD card is the issue because it works fine when I use the Reid files instead. This would also rule out a wire issue, wouldn't it?

Share this post


Link to post
Share on other sites
Just now, Vorticon said:

Sure, happy to. I don't think the SD card is the issue because it works fine when I use the Reid files instead. This would also rule out a wire issue, wouldn't it?

No.  Since Reid uses a microSD adapter in his build, the Arduino IDE sketch doesn't enable Card Detect and Write Protect (MicroSD does not have it), so that code would not bomb out.  But, to your point, the two builds use two different SD libraries, which also could be the issue.  I'd try a different card, if you have one, or connect pin 8 and 9 to ground, and see if either of those help with the card.  Report results back. That may suggest a course of action.

 

Jim

 

Share this post


Link to post
Share on other sites
27 minutes ago, brain said:

No.  Since Reid uses a microSD adapter in his build, the Arduino IDE sketch doesn't enable Card Detect and Write Protect (MicroSD does not have it), so that code would not bomb out.  But, to your point, the two builds use two different SD libraries, which also could be the issue.  I'd try a different card, if you have one, or connect pin 8 and 9 to ground, and see if either of those help with the card.  Report results back. That may suggest a course of action.

 

Jim

 

So some good news: while switching from a micro-SD card to a standard one did not make a difference, grounding pins 8 and 9 solved the problem and I am now able to load, save and read a directory. Awesome!

What exactly happened here and how do we proceed?

  • Like 2

Share this post


Link to post
Share on other sites
4 minutes ago, Vorticon said:

So some good news: while switching from a micro-SD card to a standard one did not make a difference, grounding pins 8 and 9 solved the problem and I am now able to load, save and read a directory. Awesome!

What exactly happened here and how do we proceed?

I looked at your original pics and, save 7-2 switch, you had the right connection (WP to pin 9, CD to pin 8).  I'd try connecting back pin 8, as that should not affect anything for now (I don't think I have the card detect code in place yet).  If you have a voltmeter, see if the WP pin drop in resistance to 0 ohms when a card is inserted (between it and ground).  That's how it would work, write enable is grounded, write protect is ungrounded).  Maybe the SD card holder is bad, or something like that.

 

The unit can be run with WP grounded, just be aware the WP switch will be bypassed.

 

Jim

 

Share this post


Link to post
Share on other sites

I probed the SD shield with a logic probe and the Card Detect is functioning as it should, being HIGH when there is no card present and LOW when one is inserted. On the other hand, the Write Protect pin is stuck at HIGH regardless of the position of the write protect tab on the SD card which explains my initial issues. So I guess my SD shield is defective although still perfectly usable as long as I ground pin 9. No biggy...

Share this post


Link to post
Share on other sites

There seems to be an issue with file ops from within a Basic program.

The OPEN command works fine, and so does the PRINT # command. However, when trying to read back the contents of a file with the INPUT # command, I get a bad data error. 

Try this out:

10 OPEN #1, "100.TEST", OUTPUT
20 FOR I=1 TO 10:PRINT #1, I:NEXT I
30 CLOSE #1
40 OPEN #1, "100.TEST", INPUT
50 FOR I=1 TO 10:INPUT #1, A:PRINT A:PAUSE:NEXT I
60 CLOSE #1

I checked the contents of TEST using TI99Dir and they are correct. It appears that the INPUT # statement is chocking on the first data element.

Any thoughts?

Share this post


Link to post
Share on other sites

A little more info on this. It appears that the PRINT # statement is writing the data as one string which can be read as such by the INPUT # statement. Using the code example above, the file will contain a string consisting of "1  2  3  4  5  6  7  8  9  10" instead of 10 records each with a single integer. Obviously not the proper behavior of the PRINT # statement. And if we use INTERNAL records instead of the default DISPLAY, we get a similar string with gibberish inside it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...