INKEY non lavora con ATMEGA128
 Posted: 30 Jul 2011, 08:42
Posted: 30 Jul 2011, 08:42Io sto usando bascom-avr 2.0.5.0. Ho scritto un semplice programma per comunicare con un PC attraverso
Rs232 che lavora bene con atmega32.
Quando uso questo codice con atmega128 il micro con riesce a leggere dal PC. Mi può aiutare qualcuno?
################################################################
			Rs232 che lavora bene con atmega32.
Quando uso questo codice con atmega128 il micro con riesce a leggere dal PC. Mi può aiutare qualcuno?
################################################################
- Code: Select all
- $regfile = "m128def.dat" ' specify the used micro
 $crystal = 8000000 ' used crystal frequency
 $baud = 19200 ' use baud rate
 '$baud1 = 19200
 $hwstack = 32 ' default use 32 for the hardware stack
 $swstack = 10 ' default use 10 for the SW stack
 $framesize = 40 ' default use 40 for the frame space
 Config Portf = Output
 Dim Confirmcharwaiting As Byte
 Dim Confirmchar As Byte
 Print "Hello"
 Do
 Again:
 Confirmcharwaiting = Ischarwaiting()
 If Confirmcharwaiting = 1 Then
 Confirmchar = Inkey()
 If Confirmchar = "c" Then
 Print "ok"
 Goto Nextstep
 Else
 Goto Again
 End If
 Else
 Goto Again
 End If
 Nextstep:
 Loop
 End