Das Open-Control-Projekt - Die Alternative zur C-Control-I


Das Forum zur C-Control-1
Welche C-Control-Varianten existieren?
Übersicht - Suchen - Neueste 50 Beiträge - Neuer Beitrag - Login - Registrieren
INFO - FAQ - CC2-Forum - CCPro-Forum 

 Alternative zu C-Micro für nur 2 Euro Kategorie: C-Control I Micro (von Robin Hood - 6.11.2004 15:02)
 Als Antwort auf Hier die genaue beschriftung der MICRO von mirco - 5.11.2004 22:54
Hallo Mirco

es gibt eine Alternative zur C-Micro

Atmel ATiny26
hat zwar 20 Pins aber dafür auch eine Menge mehr Möglichkeiten und kostet nur schlappe 2 Euro !
bei

www.reichelt.de

Da kann die C-Micro voll einpacken dagegen !

Leistungsdaten 16 MHz
als BASIC-COMPILER (sind viel schneller als C-Control Basic-Token-INTERPRETER)

Datenblatt gibt es hier
http://www.atmel.com/dyn/products/product_card.asp?part_id=2967


gibt es in der 2k-Version kostenlos
BASCOM-AVR

download hier

http://www.mcselec.com/download_avr.htm


Die Basic-Befehle können sehr viel mehr als cc-Basic
da müssen nicht erst extra assemblertreiber in den Minispeicher
von mickrigen 255-Byte internen Speicher geladen werden sondern
ALLES ist im Basic mit enthalten d.h. alle features sind IMMER verfügbar

hier die heissesten Features:

Variablen:
BIT , BYTE , INTEGER , WORD, LONG, SINGLE, STRING


LONG: 4-Byte integerwert
Wertebereich: -2.147.483.648 bis 2.147.483.647 (+- 2 Milliarden statt 32.000)

SINGLE:
KOMMA-Zahlen
Wertebereich: 1.5 x 10^–45 to 3.4 x 10^38


Berechnungsfunktionen:
AND, OR, XOR, INC, DEC, MOD, NOT, ABS, BCD, LOG, EXP,
SQR (Wurzel),
SIN,COS,TAN,ATN, ATN2, ASIN, ACOS, FIX, ROUND, MOD, SGN,
POWER, RAD2DEG, DEG2RAD, LOG10, TANH, SINH, COSH


if then else usw.
IF, THEN, ELSE, ELSEIF, END IF, DO, LOOP, WHILE, WEND, UNTIL,
EXIT DO, EXIT WHILE, FOR, NEXT, TO,  STEP, EXIT FOR, ON .. GOTO/GOSUB,
SELECT, CASE.


I2C-Befehle sind keine Unterroutinen sondern direkte Befehle:
I2CSTART, I2CSTOP, I2CWBYTE, I2CRBYTE, I2CSEND and I2CRECEIVE.


Programmbeispiel:

'sample of writing a byte to EEPROM AT2404
Sub Write_eeprom(byval Adres As Byte , Byval Value As Byte)
    I2cstart                                                'start condition
    I2cwbyte Addressw                                       'slave address
    I2cwbyte Adres                                          'asdress of EEPROM
    I2cwbyte Value                                          'value to write
    I2cstop                                                 'stop condition
    Waitms 10                                               'wait for 10 milliseconds
End Sub


'sample of reading a byte from EEPROM AT2404
Sub Read_eeprom(byval Adres As Byte , Value As Byte)
   I2cstart                                                 'generate start
   I2cwbyte Addressw                                        'slave adsress
   I2cwbyte Adres                                           'address of EEPROM
   I2cstart                                                 'repeated start
   I2cwbyte Addressr                                        'slave address (read)
   I2crbyte Value , Nack                                    'read byte
   I2cstop                                                  'generate stop
End Sub


Das gleiche für
1WIRE-Chips und Sensoren
1WWRITE, 1WREAD, 1WRESET, 1WIRECOUNT, 1WSEARCHFIRST, 1WSEARCHNEXT.


Interruptprogrammierung
Interrupts Per PIN-Signal Timer oder counter auslösen
ON INT0/INT1/TIMER0/TIMER1/SERIAL, RETURN, ENABLE, DISABLE, COUNTERx,
CAPTUREx, INTERRUPTS, CONFIG, START, LOAD


An beliebigen Digi-IO-PINS Softwaremässige serielle Schnittstellen
mit beliebigen Parametern Programmieren

Servos ansteuern:
'-----------------------------------------------------------------------
'                         (c) 2001-2003 MCS Electronics
'                           servo.bas demonstrates the SERVO option
'-----------------------------------------------------------------------

'Servo's need a pulse in order to operate
'with the config statement CONFIG SERVOS we can specify how many servo's we
'will use and which port pins are used
'A maximum of 16 servos might be used
'The SERVO statements use one byte for an interrupt counter and the TIMER0
'This means that you can not use TIMER0 anymore
'The reload value specifies the interval of the timer in uS
'Config Servos = 2 , Servo1 = Portb.0 , Servo2 = Portb.1 , Reload = 10

Config Servos = 1 , Servo1 = Portb.0 , Reload = 10

'we use 2 servos with 10 uS resolution(steps)

'we must configure the port pins used to act as output
Config Portb = Output

'finally we must turn on the global interrupt
Enable Interrupts

'the servo() array is created automatic. You can used it to set the
'time the servo must be on
Servo(1) = 10                                               '10 times 10 = 100 uS on
'Servo(2) = 20                                               '20 times 10 = 200 uS on
Do
Loop

Dim I As Byte
Do
 For I = 0 To 100
   Servo(1) = I
   Waitms 1000
 Next

 For I = 100 To 0 Step -1
 '  Servo(1) = I
   Waitms 1000
 Next
Loop
End


PC-Tastatur abfragen mit GETATKBD liefert den Tastaturscancode.

ganz einfache LCD-Programmierung:
Cls                                                         'clear the LCD display
Lcd "Hello world."                                          'display this at the top line
Wait 1
Lowerline                                                   'select the lower line
Wait 1
Lcd "Shift this."                                           'display this at the lower line
Wait 1
For A = 1 To 10
   Shiftlcd Right                                           'shift the text to the right
   Wait 1                                                   'wait a moment
Next

For A = 1 To 10
   Shiftlcd Left                                            'shift the text to the left
   Wait 1                                                   'wait a moment
Next

zusätzlicher EEPROM-Speicher im Prozessor


Befehle von Infrarotfernbedienungen Senden und Empfangen
Signalstandards RC5, RC6, und SONY

GETRC5( address, command )

RC6SEND togglebit,  address, command

Internet-TCP-IP-Anbindung Platine für
schlappe 38 Euro

http://www.mcselec.com/pricelis.htm
Easy TCP/IP PCB, bare board + IIM7000, ethernet module with RJ-45 magnetics


Hinweis:
Wer jetzt selbst mit google nach weiteren Infos sucht
wird oft auf dontronic STK500 u.ä. treffen das sind Entwicklungskits
in der Preisklasse 100-200 Euro

Die braucht man aber nicht.

Es gibt viel preiswertere Hardware

hier gibt es einen Programmer zum Selber bauen

http://www.online-club.de/~burkhard-john/avr_programmer/

und hier gibt es einen für 12,80 Euro zu kaufen:

http://www.shop.robotikhardware.de/shop/catalog/product_info.php?cPath=73&products_id=41

hier gibt es verschiedene boards die halb soviel wie die C-Control
kosten aber leistungsfähiger sind 32k Basic-speicher 2048 ! Byte RAM
zusätzlich 1K EEPROM für schlappe 49 Euro

http://www.shop.robotikhardware.de/shop/catalog/products_new.php?page=6

Robin Hood

informs you about much more powerful Microcontrollers
for less money
> Hallo.
> habe eine neue micro bekommen auf der sie sich mit dem entfernen der bezeichnung nicht so viel Mühe gegeben haben.
> Also Ding mit in die Firma, unters Microscop und siehe da. lesbare Zeichen!
>
> MC90804CP
> 2R2C davor ein M im Kreis
> 1302
>
>
> Hoffe ich habe alles richtig entziffert.
>
> So und wer bietet nun eine billigere micro an? Bin gespannt was man damit anfangen kann.
>
> Grüße Mirco
>

 Antwort schreiben

Bisherige Antworten:

Re: Alternative zu C-Micro für nur 2 Euro (von Bulent - 22.11.2005 14:07)
Re: Alternative zu C-Micro für nur 2 Euro (von Dietmar - 6.11.2004 17:56)
    Re: Alternative zu C-Micro für nur 2 Euro (von Henrik - 6.11.2004 20:22)
        Re: Alternative zu C-Micro für nur 2 Euro (von DIE HARD - 7.11.2004 16:36)
            Re: Alternative zu C-Micro für nur 2 Euro (von Henrik - 7.11.2004 18:04)
                Re: Alternative zu C-Micro für nur 2 Euro (von DIE HARD - 8.11.2004 1:06)
                    Re: Alternative zu C-Micro für nur 2 Euro (von C-Control Anwender - 10.11.2004 20:16)
                       Re: Alternative zu C-Micro für nur 2 Euro (von Dietmar - 11.11.2004 22:19)
                       Re: Alternative zu C-Micro für nur 2 Euro (von Henrik - 10.11.2004 22:53)