Hallo!!
Seit Wochen versuch ich mich an einer eigenen Schaltung.
Ich arbeite mit einem PIC18F45K20 und einem BlueMod Modul von Stollman.
(Das ganze programmier ich mit MPLAB und dem C18.Compiler)
Ziel ist es dass ich über den PIC eine Zeichenkette abschicke und die
dann über Bluetooth empfangen werden kann (das ganze kann ich über ein
Terminal beobachten)
Leider funktioniert GAR NICHTS.
Der BlueMod nimmt nichteinmal meine Befehle auf. Zwar kann ich den
BlueMod auf dem PC sehen und mich mit ihm verbinden, doch funktioniert
das rein zufällig. Alle Befehle den ich an ihn schicke werden gar nicht
aufgenommen.
Ich hab schon mir alles erdenkliche ausprobiert.
Anbei schick ich meinen Code.
Als erstes hab ich es über I2C versucht:
1
/** C O N F I G U R A T I O N B I T S ******************************/
Ich weiss wirklich nicht mehr weiter, das ganze ist für ein Praktikum
und mein Betreuer kann mir leider auch nicht mehr weiter helfen.
Hoffe hier sieht jemand den Fehler =/
Vielen Dank schonmal im Voraus!!
Um den Fehler einzugrenzen würde ich dir raten das BT-Modul erst einmal
via RS232 über einen PC (z.B. via Hyperterminal) anzusteuern,
Pegelwandler natürlich nicht vergessen. Damit kannst du überprüfen, ob
die einzelnen Kommandosequenzen vom Modul überhaupt akzeptiert werden.
Übrigens, müssten die einzelnen Kommandos nicht jeweils mit <CR> beendet
werden?
Super, danke für die schnellen Antworten!!
das <CR> hatte ich am Anfang auch drinnen, habs zum Test auch mal
rausgenommen und dann so gelassen da es keine Änderungen gab... daran
liegt es leider also nicht :(
Bitte richte dich unbedingt nach dem Datenblatt des Moduls. Wenn dort
ein <CR> verlangt wird, dann musst du es auch mitschicken. Bei solchen
komplexeren Projekten ist es völlig normal, daß man am Anfang mehrere
Fehler gleichzeitig eingebaut hat. Du kannst dann einen Fehler beheben
und es geht immer noch nichts, daraus zu schliessen das die Änderung
deswegen aber keinen Einfluß hat ist dann aber auch verkehrt. Ein
planloses rumprobieren führt garantiert nicht zum Ziel.
Moin Leute,
ich kenn mich jetzt nicht mit dem Modul usw. aus aber sollte nicht der
ATA Befehl der letzte in der Befehlsfolge sein?
Im Handbuch steht dazu folgender Absatz:
AT syntax: ATA
This command accepts an incoming call if automatic call acceptance is
not set
(Register S0=0). An incoming call is always signaled with the
unsolicited response
“RING“ or code “2“, even if automatic call acceptance is selected.
Note: Must be the last command in an AT command line.
Es gibt auch mehrere Module bei Stollman, welches ist es denn genau?
Kann man die Delay-Zeiten etwas großzügiger gestalten (ich weiß nicht ob
man das einfach so darf, hier sind erfahrene Leute gefragt!)
Gruß
Andi
Genau, es handelt sich um den BlueMod B20.
@Mutlos:
Was für einen Compiler benutzt du?? Bei mir sind die Befehle
"usart_write_line...." gar nicht aufgeführt :S
Ich versuchs dann mal mit so einem ähnlichen Aufbau bei meinem Programm!