Show Posts
Pages: 1 ... 4 5 [6]
76  International / Deutsch / Re: Problem mit Sonderzeichen auf dem LCD-Display (Hitachi HD44780) on: October 05, 2011, 02:37:52 pm
Ich nehme an dass der Buchstabe, hier zum Beispiel 'ä', in der Textdatei des Quellcodes als UTF-8 abgespeichert wird (anstatt zum Beispiel ISO 8859-15, dem ANSI-Zeichensatz mit Euro). Dies bedeutet, dass Sonderzeichen, die nicht im ASCII-Zeichensatz enthalten sind (darunter fallen auch Umlaute) 16 Bit groß sind anstatt 8. Damit belegen sie auch 2 Plätze im String. Dein Switch/Case castet dann 'ä' auf 'ä'&0xFF, also nur auf das Low-Byte des 2-Byte-Zeichens. Das High-Byte läuft ungeparst durch deinen Sonderzeichen-Handler und taucht damit auf dem LCD auf.
UTF8 sieht so aus:
ä=0xC3A4, das entspricht in ANSI (und auf A02-LCDs) ä, auf A00-LCDs dem Katakana te und einem kleinen diagonalen Strich, der wahrscheinlich irgendwelche Bedeutung als Satzzeichen oder so etwas hat.
ö=0xC3B6 = ANSI ö = te ka
ü=0xC3BC = ANSI ü = te shi
Und das andere japanische Zeichen beim Grad-Symbol ist auch erklärt:
°=0xC2B0 = ANSI ° = tsuu (tsu mit Chouonpo, einem Verlängerungszeichen)
Ein
Code:
case 'Â':
case 'Ã': continue;
sollte zumindest für Umlaute, Grad und ß das Problem lindern.
77  Forum 2005-2010 (read only) / Troubleshooting / Re: Atmega8L-8pu on: January 22, 2011, 01:39:47 pm
You can, but keep in mind that they are not guaranteed to run on 16 MHz. They usually do, though. You can also substitute an ATmega168-10PU or an ATmega328P-20PU, both can easily run at 16 MHz and have Arduino-compatible firmwares shipped with the Arduino client software.
78  Forum 2005-2010 (read only) / Troubleshooting / Trouble with programming ATMegas on: January 21, 2011, 01:39:18 pm
Hi folks,
I'm new to physical computing, but I ran into problems while flashing my ATmegas with the Arduino bootloader, so I thought that your experience might be helpful.
A few weeks ago, I started experimenting with microcontrollers. I got an ATmega8-16PU and an 7805, flashed it with some modified Arduino code ( to use the 8 MHz internal oscillator) using a PonyProg serial bit-bang programmer, built the hacked-together Arduino serial interface using the Severino schematic and had some fun. Later I upgraded to a MAX232 and a 16 MHz Quartz, and when I used its newfound timing abilities, I probably fried it. The problem:  I had used the MISO as an imput, relying on the high input impedance. It was a lesson learned, never trust the pin states, and I knew I would do it better next time.

Now a pair of ATmega328Ps arrived, but when I tried to flash them with the Duemilanove bootloader, it exhibited the very same problems I had with the fried Mega8:
a) When I try to flash it, it does not actually write anything
b) After I have connected to the device, if I wait a certain time and then start to read from it, I get some weird byte sequence, always counting up from 0:
0x00 0x00 0x01 0x01 0x02 0x02 and so on.
Anybody here knows such a symptom and, more importantly, what causes it? Is it a fried µC, a bad serial port, an unreliable power supply or what is it?
I am a little afraid to try and burn my second Mega328 now. They are not awfully expensive, but not awfully cheap like some LED either, nor commonly in stock.
I wish I had a proper programmer, bot those guys are not too cheap either.
Pages: 1 ... 4 5 [6]