You are not logged in.

Draco

lebt in einer Idiokratie

  • »Draco« is a verified user
  • "Draco" started this thread
  • Send private message

member since 36 month member since 36 month member since 36 month

1

Sunday, March 8th 2009, 10:31am

SD2IEC LCD Release V0.2b

Moin!

Ich hab' monentan leider keine Zeit das in einen Stand zu bringen, in dem ich es gerne hätte, deshalb gibt's einfach das aktuelle Paket:
Click

Introduction
============

SD2IEC LCD 0.2b is my try to extend the SD2IEC/MCC2IEC controllers with a LCD display.
index.php?page=Attachment&attachmentID=18039index.php?page=Attachment&attachmentID=18040index.php?page=Attachment&attachmentID=18041

It is bases heavily on the SD2IEC 0.6.6 firmware by Ingo Korb, who did a great job there!

Note that i made several modifications of the firmware. Ingo Korb is not responsible for
any wanted or unwanted features of this firmware version.

Since this is a slightly unfinished fun project (sorry, not so much spare time at the moment)
i am publishing it as it is in the hope that it will be useful.

There's no guarantee that the code works or that the suggested hardware modifications are correct.
Use it on your own risk!


Additional Features
===================

* Based on the SD2IEC Firmware V0.6.6 by Ingo Korb

* Runs on Atmel ATMEGA32 MCU. Should run on ATMEGA644P MCU too (not yet tested).

* Display various information like
- current path (D:<path>)
- current D64 image (D:<Image.d64>)
- file access (L/S/R:<file>)
- error messages (E:<message>)
- user defined messages
- and a nice boot screen (-;

* Support HD 44780 compatible displays (2x16 or 2x20 chars)


Removed Features
================

I fitted in the LCD routines at the price of:

- No debug code (UART output)
- No bootloader support on ATMEGA32 (sorry, not enough space)


Additional Commands available via IEC
=====================================

XT* Text Commands
-----------------

The display can be accessed from the c64!
Use commands "XT1" and "XT2" to send text to display line 1 or 2.
The addressed line will be cleared before text is printed.

Example 1 - send "Lightyears ahead!" to line1:

OPEN15,8,15,"XT1Lightyears ahead!"

The "XTC" command allows to send a control code followed by data, which makes it possible
to program the display from the C64 side, e.g. define own characters.

Example2 - clear the screen:

OPEN15,8,15,"XTC"+CHR$(1) will clear the screen.

Example 3 - define a special character with a "heart" (line 2) and print it 3 times (line 3):
1 OPEN15,8,15
2 PRINT#15,"XTC"+CHR$(64)+CHR$(27)+CHR$(31)+CHR$(31)+CHR$(14)+CHR$(4)+CHR$(0)+CHR$(0)
3 print#15,"XT1"+CHR$(8)+CHR$(8)+CHR$(8)
4 CLOSE15


Display About Message
----------------------

The XA command shows a small about message:

Example:

OPEN15,8,15,"XA"

Display Greetings & Credits
---------------------------

The XG command shows the greetings and credits:

Example:

OPEN15,8,15,"XG"


Undocumented experimental feature
----------------------------------

The XX command is not documented. It might cause skynet to
link all computers together to play a game of global
thermonuclear war.

Maybe your C64 is not connected to skynet, so you'll give it a try.
Good luck!

Example:

OPEN15,8,15,"XX"


LCD Hardware
============

Every HD 44780 compatible displays (2x16 or 2x20 chars) should work
The display is accessed in 4-bit mode.

Different pinouts have to be used depending on the hardware variant
of the SD2IEC / MMC2IEC device:


sd2iec V1.4 by Shadowolf (sw1 variant)
MMC2IEC by Lars Pontoppidan (larsp variant)
-------------------------------------------
(original design, also used by PCBs from Peter Sieg)

Display Atmega
RS PB0
RW PB1
E PB2
DB4 PA4
DB5 PA5
DB6 PA6
DB7 PA7


sd2iec V1.6 by Shadowolf (sw2 variant)
--------------------------------------
ATTENTION: I have not yet tested this pinout so it might be possible that it is not working.
At least it will be hard to solder the display to PB0,PB1 and PB3 if using a TQFP44 mcu.

Display Atmega
RS PB0
RW PB1
E PB3

DB4 PC4
DB5 PC5
DB6 PC6
DB7 PC7

For other variants please feel encouraged to change the lcd.h to suit your needs.


Credits
=======

Ingo Korb alias for his great SD2IEC firmware.
Shadowolf for his outstanding hardware designs running the SD2IEC firmware.
Lars Pontoppidan for creating the MMC2IEC in the first place.
Jim Brain & ChaN for basic code like IEC routines and FAT driver.
Commodore for the good times.

Licence
=======

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License only.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

for(;;)

Professional

Posts: 1,257

Date of registration: Aug 28th 2005

Location: Leverkusen

  • Send private message

member since 48 month member since 48 month member since 48 month member since 48 month

2

Sunday, March 8th 2009, 2:46pm

Vielen Dank, Draco!

Du hast ja auf der sd2iec 0.6.6 aufgebaut und aus Platzgründen ein paar Sachen entfernt - wie groß schätzt Du den Aufwand ein, Deine LCD-Sachen in die aktuelle 0.8.0pre1 einzupflegen?

  • "jackdaniels" is male
  • »jackdaniels« is a verified user

Posts: 7,123

Date of registration: Mar 11th 2005

Location: Bergheim

  • Send private message

member since 60 month member since 60 month member since 60 month member since 60 month member since 60 month

3

Sunday, March 8th 2009, 3:47pm

I fitted in the LCD routines at the price of:

- No debug code (UART output)
- No bootloader support on ATMEGA32 (sorry, not enough space)


ist das alles was rausgeflogen ist ja?
also müsste ich den atmega 32 per ISP programmieren?

ansonsten nit schlecht :D

wäre nur froh wenn die bootloaderfunktion wieder drinne wäre zum preis von was anderem.
Suche:
CDI, +4 OVP, NeoGeo, PCEngine, Jaguar, Sega MegaCD, MSX2

4

Sunday, March 8th 2009, 4:06pm

Nachdem das auf einem Atmega32 (mmc2iec 1.6) beruht müsste doch im 644er (sd2iec 1.2) Platz für die Ansteuerung und für den Bootloader frei sein, oder?
Die Frage ist halt, ob man als Nicht-Löter auch an die notwendigen Pins am Atmega kommt ohne das sd2iec gleich ins Nirvana zu befördern! :roll:
Also ich wär da noch immer sehr an einer Lösung mit Display interessiert....
znarF

5

Sunday, March 8th 2009, 8:02pm

Sehr schön, das gefällt mir!!! Hoffe auch auf ne Version 0.8.0!

Draco

lebt in einer Idiokratie

  • »Draco« is a verified user
  • "Draco" started this thread
  • Send private message

member since 36 month member since 36 month member since 36 month

6

Sunday, March 8th 2009, 8:12pm

Musste das CBM-Logo und den "XX"-Befehl vorerst wieder rausnehmen, weil sonst zur Laufzeit der wertvolle Speicher zu knapp wird.
Hier also die aktualisierten Sourcen Sources
Und das aktualisierte Image für Larsp-hardware: Firmware

Unseen

Ia! Ia! sd2iec fhtagn!

Posts: 2,393

Date of registration: Jun 16th 2007

Location: Deutschland

  • Send private message

member since 36 month member since 36 month member since 36 month

7

Sunday, March 8th 2009, 8:19pm

Musste das CBM-Logo und den "XX"-Befehl vorerst wieder rausnehmen, weil sonst zur Laufzeit der wertvolle Speicher zu knapp wird.

Sowas legt man ja auch nicht im RAM sondern im Flash ab. =) Wie das geht kannst du dir zB in errormsg.c anschauen, die Fehlermeldungen liegen auch nur im Flash.

Draco

lebt in einer Idiokratie

  • »Draco« is a verified user
  • "Draco" started this thread
  • Send private message

member since 36 month member since 36 month member since 36 month

8

Sunday, March 8th 2009, 8:24pm

Sowas legt man ja auch nicht im RAM sondern im Flash ab. =) Wie das geht kannst du dir zB in errormsg.c anschauen, die Fehlermeldungen liegen auch nur im Flash.

Yep, da hast Du wohl Recht. Danke für den Tip! Schmerzliche Erfahrung, dass für die 64 Bytes Logo kein Platz mehr im RAM war...

  • »C64-CAMPER« is a verified user

Posts: 6,554

Date of registration: Mar 31st 2006

  • Send private message

member since 48 month member since 48 month member since 48 month member since 48 month

9

Sunday, March 8th 2009, 8:24pm

Hey,
SUPER ! :)

Baust mir das an mein MMC2IEC ? :D

10

Sunday, March 15th 2009, 3:12pm

Display Atmega
RS PB0
RW PB1
E PB3

DB4 PC4
DB5 PC5
DB6 PC6
DB7 PC7


Hmm, wär das nicht mit dem NKC-sd2iec leicht(er) zu realisieren? Bisher hatte ich ja schon das Problem, das ich nicht an die benötigten Pins vom Atmega ran komme. Mit dem Teil von NKC wäre die o.a. Pins über eine Stiftleiste zu erreichen.

index.php?page=Attachment&attachmentID=18222

Und nun die Frage an die Amega Profis: Wie hoch schätzt ihr den Aufwand die Ansteuerung eines LCD Displays in die aktuelle 0.8er FW zu bekommen?

lg,
znarF

Draco

lebt in einer Idiokratie

  • »Draco« is a verified user
  • "Draco" started this thread
  • Send private message

member since 36 month member since 36 month member since 36 month

11

Sunday, March 15th 2009, 4:58pm

Die weiter oben beschriebenen Funktionen in den Code einzubauen dauert eine Stunde (ich weiß es, denn ich hab' das eben gemacht).
Hinzu kommen einige Stunden für Tests, Doku, Uploads und Diskussionen im Forum (-;

12

Sunday, March 15th 2009, 5:47pm

Die schönere Lösung wäre es, das Display über einen Tiny2313 anzuschliessen. Der Atmega des SD2IEC versorgt den Tiny über I2C oder UART.

13

Sunday, March 15th 2009, 6:59pm

Die schönere Lösung wäre es, das Display über einen Tiny2313 anzuschliessen. Der Atmega des SD2IEC versorgt den Tiny über I2C oder UART.


Hmm, ist das dann ein Mehraufwand das in die Firmware von Unseen einzupflegen? Denn Tiny2313 würde es sogar als Dip-20 geben und mit 1,30 wär der gar nicht mal so teuer. Das Display ist da schon etwas teurer, kostet doch das günstigste Ding bei Reichelt 17,15 aber da wirds sicherlich auch günstigere geben.
znarF

14

Sunday, March 15th 2009, 7:46pm

Ich kaufe Displays mit 24 Zeichen 2 Zeilen um 5€: klick


Der Tiny könnte sich um Display und evt. um Tastatur kümmern. Das ganze Modul würde nur 2 Pin des SD2IEC benötigen. Wenn man I2C nimmt, dann sind die eh schon für die Echtzeituhr verwendet, der Tiny könnte quasi zusätzlich zur Echtzeituhr drauf hängen.

Draco

lebt in einer Idiokratie

  • »Draco« is a verified user
  • "Draco" started this thread
  • Send private message

member since 36 month member since 36 month member since 36 month

15

Sunday, March 15th 2009, 8:06pm

Ich habe mir ein paar sehr schöne seriell ansteuerbare VFDs für kleines Geld sichern können:
index.php?page=Attachment&attachmentID=18234
Jetzt braucht's nur noch ein schönes Gehäuse....

16

Sunday, March 15th 2009, 9:23pm

Ich biete demjenigen, der die o.a. Vorschläge mit Tiny2123 und einem Standart Display zum laufen bekommt, einen nagelneuen Double Layer SATA Brenner als Bounty.

Voraussetzung:
Unseen muss aber das ganze als Patch in die bestehende Firmware einpflegen können und somit absegnen!

Es sollte sowohl mit Shadowolf´s sd2iec 1.2 als auch mit dem sd2iec von NKC funktionieren. Vielleicht kann uns Shadowolf ja eine kleine Platine dazu zaubern! :winke: (dann gibts für ihn dasselbe Bounty!)
lg,
znarF

Unseen

Ia! Ia! sd2iec fhtagn!

Posts: 2,393

Date of registration: Jun 16th 2007

Location: Deutschland

  • Send private message

member since 36 month member since 36 month member since 36 month

17

Sunday, March 15th 2009, 9:38pm

Unseen muss aber das ganze als Patch in die bestehende Firmware einpflegen können und somit absegnen!

Ok, keiner bekommt die Bounty. =) Oder gibts schon Flaggen-Displays? (Standarte)

Ich habe hier schon seit einiger Zeit die Hardware zusammengesteckt um eine eigene Displaylösung zu implementieren, aber die wird mit einem 2313 auf Displayseite nicht auskommen wenn ich die Menüs so implementiere (resourcensparend auf sd2iec-Seite) wie es mir vorschwebt. Wird aber noch dauern bis da was fertig wird...

18

Sunday, March 15th 2009, 9:52pm

Na dann steht schon fest wer den Brenner kassieren wird! :bia
Und das Bounty vom sdiec bekommst ja auch noch von mir....Rest per PM!
lg,
znarF

NLQ

Intermediate

  • "NLQ" is male

Posts: 214

Date of registration: Feb 20th 2005

Location: Kirchardt bei Heilbronn

  • Send private message

member since 60 month member since 60 month member since 60 month member since 60 month member since 60 month

19

Tuesday, March 17th 2009, 11:24pm

Ich habe diesen, im angehängten Textfile enthaltenen, Traum von einem Display für AVR-basierende-Drives. Er hat leider einen 28-Pin-MEGA88 statt eines 18-Pin-TINY2313. Ich habe dies nur im Kopf geplant und absolut keine Experimentierschaltung dazu erstellt, sodass ich über die Realisierbarkeit absolut nichts sagen kann. Wenn es ginge, hätte er: 6 Taster, 4 LEDs, die Fähigkeit, den Haupt-AVR resetten zu können und eine Echtzeituhr. Er sollte über den I2C-Bus mit dem Haupt-AVR verbunden werden. Dies hätte den Vorteil, dass man eine PCF8583-RTC gleichzeitig anschließen könnte, falls die MEAG88-RTC doch zuviel Strom verbrauchen würde oder Ticks verliert oder falls einem die Batterie zu groß ist.
Ich weiss, dass ich mich mit diesem Vorschlag weit vorwage. Es ist nur so eine Idee, über die man diskutieren kann, aber nicht muss. Wenn die Idee schlecht ist, dann reagiert einfach nicht darauf. Ich bitte um Entschuldigung, falls ich mich in etwas eingemischt habe, das mich nichts angeht.
NLQ has attached the following file:

for(;;)

Professional

Posts: 1,257

Date of registration: Aug 28th 2005

Location: Leverkusen

  • Send private message

member since 48 month member since 48 month member since 48 month member since 48 month

20

Wednesday, March 18th 2009, 8:36am

Die schönere Lösung wäre es, das Display über einen Tiny2313 anzuschliessen. Der Atmega des SD2IEC versorgt den Tiny über I2C oder UART.


Wo ist denn da der entscheidende Vorteil?

Bis jetzt sehe ich bei dieser Lösung nur Nachteile. Ein Kabel kann man ohne weiteres eben auf eine bestehende Schaltung auflöten, aber den ATtiny dann noch frei fliegend irgendwo einzuhängen finde ich nicht so schön. Dann will der extra Chip natürlich auch noch geflasht werden und man hat eine weitere Fehlerquelle, da man nicht nur eine Firmware zu aktualisieren und zu flashen hat, sondern derer zwei. Zwei mal Fuses setzen (oder zerschiessen) etc.

Am ATmega sind doch genügend Anschlüsse für das Display frei. Und Taster sind ja ohnehin schon implementiert.
Klärt mich mal auf...