Ich komme nicht weiter, brauche mal Hilfe.
Ich habe eine vorhandene alte Hardware mit einem SH1106 Display. Ich habe bis die neue Platine fertig war damit meine Software vorbereitet und getestet. Alles ohne Probleme.
Die neue Platine bestückt und, nichts geht. Bei der neuen Platine benutze ich D4 und D5 für SCL und SDA.
Config Scl = Portd.5
Config Sda = Portd.4
Egal, was ich dort hinschreibe, der Nano benutzt immer Portc.5 und Portc.4.
'********************************************************************************************************************************
' 433MHz Sender HC-12 Modul
'
' Software V 1.0
' Compiler 2.0.8.5
'
'
'********************************************************************************************************************************
'
'
'
' V1.0 Grundgerüst
'
'
$regfile = "m328pdef.dat"
$crystal = 16000000
$hwstack = 64
$swstack = 64
$framesize = 64
Enable Interrupts 'Interrupts zulassen
$baud = 9600 'Serieller Ein- Ausgang
$lib "glcdSH1106-I2C.lib"
$lib "i2c_twi.lbx"
'--- DCF initialisieren Anstelle von Timer --------------------------------------------------------------------------------------
Config Dcf77 = Pinc.2 , Inverted = 0 , Timer = 1 , Debug = 0 , Check = 2 , Update = 2 , Gosub = Sectic
Config Date = Dmy , Separator = . 'TAG.Monat.Jahr
'PinB.2 ( Eingang für DCF Signal)
'Invert = 0 (Nichtinvertiertes DCF Signal)
'Timer = (Benutzter Timer)
'Debug = 0 (Kein Debuging)
'Check = 1 (Stellt Uhrzeit schneller, geringe Überprüfung)
'Check = 2 (Volle Überprüfung empfolen bei schlechtem DCF Signal)
'Update = 2 (1-Stündlich,2-Täglich)
'--- Portpins setzen ------------------------------------------------------------------------------------------------------------
Config Scl = Portd.5
Config Sda = Portd.4
I2cinit
Config Twi = 400000 'i2c speed 400Hz
'--- Display initialisieren -----------------------------------------------------------------------------------------------------
Config Graphlcd = Custom , Cols = 128 , Rows = 64 , Lcdname = "SH1106"
Cls
'--------------------------------------------------------------------------------------------------------------------------------
'--- Start Programm ------------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------------------------------
'--- Haupt Programm ---------------------------------------------------------------
Do
Cls
Wait 2
Setfont My12_16
Lcdat 1 , 40 , "HC-12"
Setfont My6_8
Lcdat 4 , 48 , "Sender"
Lcdat 6 , 7 , "Test Software V 1.0"
Lcdat 8 , 23 , "T.Schmidt 2022"
Wait 2
Loop
'--------------------------------------------------------------------------------------------------------------------------------
'--- Sectic --------------------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------------------------------
Sectic:
Return
'--------------------------------------------------------------------------------------------------------------------------------
'--- ENDE ----------------------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------------------------------
End
'---------------------------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------------------------
'include used fonts
$include "My6_8.font"
$include "My12_16.font"
$include "Digital20x32.font"
Ich habe eine vorhandene alte Hardware mit einem SH1106 Display. Ich habe bis die neue Platine fertig war damit meine Software vorbereitet und getestet. Alles ohne Probleme.
Die neue Platine bestückt und, nichts geht. Bei der neuen Platine benutze ich D4 und D5 für SCL und SDA.
Config Scl = Portd.5
Config Sda = Portd.4
Egal, was ich dort hinschreibe, der Nano benutzt immer Portc.5 und Portc.4.
'********************************************************************************************************************************
' 433MHz Sender HC-12 Modul
'
' Software V 1.0
' Compiler 2.0.8.5
'
'
'********************************************************************************************************************************
'
'
'
' V1.0 Grundgerüst
'
'
$regfile = "m328pdef.dat"
$crystal = 16000000
$hwstack = 64
$swstack = 64
$framesize = 64
Enable Interrupts 'Interrupts zulassen
$baud = 9600 'Serieller Ein- Ausgang
$lib "glcdSH1106-I2C.lib"
$lib "i2c_twi.lbx"
'--- DCF initialisieren Anstelle von Timer --------------------------------------------------------------------------------------
Config Dcf77 = Pinc.2 , Inverted = 0 , Timer = 1 , Debug = 0 , Check = 2 , Update = 2 , Gosub = Sectic
Config Date = Dmy , Separator = . 'TAG.Monat.Jahr
'PinB.2 ( Eingang für DCF Signal)
'Invert = 0 (Nichtinvertiertes DCF Signal)
'Timer = (Benutzter Timer)
'Debug = 0 (Kein Debuging)
'Check = 1 (Stellt Uhrzeit schneller, geringe Überprüfung)
'Check = 2 (Volle Überprüfung empfolen bei schlechtem DCF Signal)
'Update = 2 (1-Stündlich,2-Täglich)
'--- Portpins setzen ------------------------------------------------------------------------------------------------------------
Config Scl = Portd.5
Config Sda = Portd.4
I2cinit
Config Twi = 400000 'i2c speed 400Hz
'--- Display initialisieren -----------------------------------------------------------------------------------------------------
Config Graphlcd = Custom , Cols = 128 , Rows = 64 , Lcdname = "SH1106"
Cls
'--------------------------------------------------------------------------------------------------------------------------------
'--- Start Programm ------------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------------------------------
'--- Haupt Programm ---------------------------------------------------------------
Do
Cls
Wait 2
Setfont My12_16
Lcdat 1 , 40 , "HC-12"
Setfont My6_8
Lcdat 4 , 48 , "Sender"
Lcdat 6 , 7 , "Test Software V 1.0"
Lcdat 8 , 23 , "T.Schmidt 2022"
Wait 2
Loop
'--------------------------------------------------------------------------------------------------------------------------------
'--- Sectic --------------------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------------------------------
Sectic:
Return
'--------------------------------------------------------------------------------------------------------------------------------
'--- ENDE ----------------------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------------------------------
End
'---------------------------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------------------------
'include used fonts
$include "My6_8.font"
$include "My12_16.font"
$include "Digital20x32.font"