Print Ausgabe verschluckt einige Zeichen.

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    Aufgrund technischer Veränderungen ist der Mailverkehr innerhalb des Forums (Private Nachrichten) nur noch eingeschränkt möglich. Die Einschränkung ist notwendig, um zusätzliche Betriebskosten für das Forum zu vermeiden. Näheres zu den Hintergründen im Thread "Aktuelles zum Forum".Wir bitten um Verständnis.

    Hinweis kann nach Kenntnisnahme deaktiviert werden!

    • Print Ausgabe verschluckt einige Zeichen.

      Hallo,

      ich gebe mit Print mehrere Zeilen aus und mir werden immer an der selbe stelle Zeichen verschluckt.

      Eingestellt ist Baudrate: 115200, Quarz: 7372800

      ich habe an der betroffene stellen jetzt auch Waitms 100 reingeschrieben, hat nichts gebracht.

      BASCOM-Quellcode

      1. Print "############################ Commands ################################"
      2. Print ""
      3. Print " Winkel berechnen:"
      4. Print ""
      5. Print " <wk 55 1>"
      6. Print " <wo 1 1>"
      7. Print ""
      8. Print ""
      9. Print " <wa 1 0>"
      10. Print "-----------------------------------------------------------------------"
      11. Print ""
      12. Print " Lichtwelle"
      13. Print ""
      14. Print " <alpha>"
      15. Print "-----------------------------------------------------------------------"
      16. Print ""
      17. Print " Omega"
      18. Print ""
      19. Print " <halb>"
      20. Print " <ganz>"
      21. Print ""
      22. Print " Zeta"
      23. Print ""
      24. Print " Wert1, Wert2, Wert3"
      25. Print " Beta"
      26. Print " Wert = "; Sigma
      27. Print ""
      28. Print " <intlist>"
      29. Print ""
      30. Waitms 100
      31. Print " Eingabe durch Lichtwelle:"
      32. Print " <ZetaBeta>"
      33. Print ""
      34. Print " Rückgabewerte sind:"
      35. Print ""
      36. Print " <OmegaSigma>"
      37. Print ""
      38. Print " Winkel unter 135°:"
      39. Print " <dd_false>"
      40. Print ""
      41. Print " Winkel über 135°:"
      42. Print ""
      43. Print " <dd_true>"
      44. Print ""
      45. Print " Berechnung der Strecke:"
      46. Print " SI OM AL GH OP KL TZ FG"
      47. Print " 1+ 2+ 4+ 8+ 16+ 32+ 64+ 128 = 255"
      48. Print ""
      49. Print "-----------------------------------------------------------------------"
      50. Print ""
      51. Waitms 100
      52. Print " Senden erfoigreich:"
      53. Print " 1, Beta, 2, Zeta"
      54. Print " OmegaZetaBeta"
      55. Print " Warten auf Rückmeldung!"
      56. Print ""
      57. Print ""
      58. Print "-----------------------------------------------------------------------"
      59. Print ""
      60. Print " Fehler quittieren:"
      61. Print ""
      62. Print " <error_reset>"
      63. Print ""
      64. Print "-----------------------------------------------------------------------"
      65. Print ""
      66. Print " Status abfragen Licht"
      67. Print " "
      68. Print " <gStatus_Lichtwelle>"
      69. Print ""
      70. Print "-----------------------------------------------------------------------"
      71. Print ""
      72. Print " Status abfragen Strecke"
      73. Print " <gStatus_Strecke>"
      74. Print ""
      75. Print "-----------------------------------------------------------------------"
      76. Print ""
      77. Print "#######################################################################"
      Alles anzeigen
      was kann die Ursache sein?


      VG
      Katip
    • katipefendi schrieb:

      Print " Wert1, Wert2, Wert3"
      Print " Beta"
      Print " Wert = "; Sigma
      Hallo Katipefendi,
      Quarz- und RS232 Parameter passen gut, doch wie Michael schon schrieb, fehlt der Zusamenhang. a_19_23577ce2
      Deshalb sind nur Vermutungen möglich.
      Die Variable Sigma ist die einzige von dir hier gelistete und eventuell der Auslöser.
      Zumindest ist nicht ersichtlich, wie sie definiert ist und könnte den Puffer zumüllen, besonders wenn sie Steuerzeichen beinhalten würde.
      Gruß Rudi
      Immer Glück haben ist fast wie können..

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Rudi Einstein ()

    • Hallo Zusammen,

      jetzt habe ich mal ein Standarttext genommen, um einiges auszuschließen.
      Empfangen wird diese am PC mit der Standard MS-Hyperterminal.
      Einstellungen wie folgt,

      ht1.PNG

      $regfile = "m328pdef.dat"
      $crystal = 7372800
      $baud = 115200

      $hwstack = 110
      $swstack = 120

      $framesize = 50

      BASCOM-Quellcode

      1. Print " Lorem ipsum dolor sit amet, consectetur adipiscing elit, set eiusmod tempor incidunt et labore et dolore magna aliquam "
      2. Print " Ut enim ad minim veniam, quis nostrud exerc "
      3. Print " Irure dolor in reprehend incididunt ut labore et dolore magna aliqua "
      4. Print " Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat "
      5. Print " Duis aute irure dolor in reprehenderit in voluptate velit esse molestaie cillum "
      6. Print " Tia non ob ea soluad incommod quae egen ium improb fugiend "
      7. Print " Officia deserunt mollit anim id est laborum Et harumd dereud facilis est er expedit distinct "
      8. Print " Nam liber te conscient to factor tum poen legum odioque civiuda et tam "
      9. Print " Neque pecun modut est neque nonor et imper ned libidig met, consectetur adipiscing elit, sed ut labore et dolore magna aliquam is nostrud exercitation ullam mmodo consequet "
      10. Print " Duis aute in voluptate velit esse cillum dolore eu fugiat nulla pariatur "
      11. Print " At vver eos et accusam dignissum qui blandit est praesent "
      12. Print " Trenz pruca beynocguon doas nog apoply su trenz ucu hugh rasoluguon monugor or trenz ucugwo jag scannar "
      13. Print " Wa hava laasad trenzsa gwo producgs su IdfoBraid, yop quiel geg ba solaly rasponsubla rof trenzur sala ent dusgrubuguon "
      14. Print " Offoctivo immoriatoly, hawrgasi pwicos asi sirucor "
      15. Print " Thas sirutciun applios tyu thuso itoms ghuso pwicos gosi sirucor in mixent gosi sirucor ic mixent ples cak ontisi sowios uf Zerm hawr rwivos "
      16. Print " Unte af phen neige pheings atoot Prexs eis phat eit sakem eit vory gast te Plok peish ba useing phen roxas "
      17. Print " Eslo idaffacgad gef trenz beynocguon quiel ba trenz Spraadshaag ent trenz dreek wirc procassidt program "
      18. Print " Cak pwico vux bolug incluros all uf cak sirucor hawrgasi itoms alung gith cakiw nog pwicos. "
      19. Print " "
      20. Print " Plloaso mako nuto uf cakso dodtos anr koop a cupy uf cak vux noaw yerw phuno "
      21. Print " Whag schengos, uf efed, quiel ba mada su otrenzr swipontgwook proudgs hus yag su ba dagarmidad "
      22. Print " Plasa maku noga wipont trenzsa schengos ent kaap zux copy wipont trenz kipg naar mixent phona "
      23. Print " Cak pwico siructiun ruos nust apoply tyu cak UCU sisulutiun munityuw uw cak UCU-TGU jot scannow "
      24. Print " Trens roxas eis ti Plokeing quert loppe eis yop prexs "
      25. Print " Piy opher hawers, eit yaggles orn ti sumbloat alohe plok "
      26. Print " Su havo loasor cakso tgu pwuructs tyu InfuBwain, ghu gill nug bo suloly sispunsiblo fuw cakiw salo anr ristwibutiun "
      27. Print " Hei muk neme eis loppe "
      28. Print " Treas em wankeing ont sime ploked peish rof phen sumbloat syug si phat phey gavet peish ta paat ein pheeir sumbloats "
      29. Print " Aslu unaffoctor gef cak siructiun gill bo cak spiarshoot anet cak GurGanglo gur pwucossing pwutwam "
      30. Print " Ghat dodtos, ig pany, gill bo maro tyu ucakw suftgasi pwuructs hod yot tyubo rotowminor "
      31. Print " Plloaso mako nuto uf cakso dodtos anr koop a cupy uf cak vux noaw yerw phuno "
      32. Print " Whag schengos, uf efed, quiel ba mada su otrenzr swipontgwook proudgs hus yag su ba dagarmidad "
      33. Print " Plasa maku noga wipont trenzsa schengos ent kaap zux copy wipont trenz kipg naar mixent phona "
      34. Print " Cak pwico siructiun ruos nust apoply tyu cak UCU sisulutiun munityuw uw cak UCU-TGU jot scannow "
      35. Print " Trens roxas eis ti Plokeing quert loppe eis yop prexs "
      36. Print " Piy opher hawers, eit yaggles orn ti sumbloat alohe plok "
      37. Print " Su havo loasor cakso tgu pwuructs tyu. "
      38. Print " At vver eos et accusam dignissum qui blandit est praesent "
      39. Print " Trenz pruca beynocguon doas nog apoply su trenz ucu hugh rasoluguon monugor or trenz ucugwo jag scannar "
      40. Print " Wa hava laasad trenzsa gwo producgs su IdfoBraid, yop quiel geg ba solaly rasponsubla rof trenzur sala ent dusgrubuguon "
      41. Print " Offoctivo immoriatoly, hawrgasi pwicos asi sirucor "
      42. Print " Thas sirutciun applios tyu thuso itoms ghuso pwicos gosi sirucor in mixent gosi sirucor ic mixent ples cak ontisi sowios uf Zerm hawr rwivos "
      43. Print " Unte af phen neige pheings atoot Prexs eis phat eit sakem eit vory gast te Plok peish ba useing phen roxas "
      44. Print " Eslo idaffacgad gef trenz beynocguon quiel ba trenz Spraadshaag ent trenz dreek wirc procassidt program "
      45. Print " Cak pwico vux bolug incluros all uf cak sirucor hawrgasi itoms alung gith cakiw nog pwicos. "
      46. Print " "
      47. Print " Plloaso mako nuto uf cakso dodtos anr koop a cupy uf cak vux noaw yerw phuno "
      48. Print " Whag schengos, uf efed, quiel ba mada su otrenzr swipontgwook proudgs hus yag su ba dagarmidad "
      49. Print " Plasa maku noga wipont trenzsa schengos ent kaap zux copy wipont trenz kipg naar mixent phona "
      50. Print " Cak pwico siructiun ruos nust apoply tyu cak UCU sisulutiun munityuw uw cak UCU-TGU jot scannow "
      51. Print " Trens roxas eis ti Plokeing quert loppe eis yop prexs "
      52. Print " Piy opher hawers, eit yaggles orn ti sumbloat alohe plok "
      53. Print " Su havo loasor cakso tgu pwuructs tyu InfuBwain, ghu gill nug bo suloly sispunsiblo fuw cakiw salo anr ristwibutiun "
      54. Print " Hei muk neme eis loppe "
      55. Print " Treas em wankeing ont sime ploked peish rof phen sumbloat syug si phat phey gavet peish ta paat ein pheeir sumbloats "
      56. Print " Aslu unaffoctor gef cak siructiun gill bo cak spiarshoot anet cak GurGanglo gur pwucossing pwutwam "
      57. Print " Ghat dodtos, ig pany, gill bo maro tyu ucakw suftgasi pwuructs hod yot tyubo rotowminor "
      58. Print " Plloaso mako nuto uf cakso dodtos anr koop a cupy uf cak vux noaw yerw phuno "
      59. Print " Whag schengos, uf efed, quiel ba mada su otrenzr swipontgwook proudgs hus yag su ba dagarmidad "
      60. Print " Plasa maku noga wipont trenzsa schengos ent kaap zux copy wipont trenz kipg naar mixent phona "
      61. Print " Cak pwico siructiun ruos nust apoply tyu cak UCU sisulutiun munityuw uw cak UCU-TGU jot scannow "
      62. Print " Trens roxas eis ti Plokeing quert loppe eis yop prexs "
      63. Print " Piy opher hawers, eit yaggles orn ti sumbloat alohe plok "
      64. Print " Su havo loasor cakso tgu pwuructs tyu. "
      Alles anzeigen

      auch hier habe ich das Problem, das exakt an der gleiche Stellen Zeichen verloren gehen.

      Mitch64 schrieb:

      Ich denke auch, dass ein zu kleiner Empfangsbuffer auf der Empfängerseite die Ursache sein kann.
      Was könnte ich da gegen machen?


      Zitronenfalter schrieb:

      Ich könnte mir vorstellen, dass bei der von dir gewählten hohen Geschwindigkeit eine Flusskontrolle sinnvoll wäre.
      Wie macht man so eine Flusskontrolle, gibt es dazu ein Beispiel?

      VG
      Katip
    • katipefendi schrieb:

      Wie macht man so eine Flusskontrolle, gibt es dazu ein Beispiel?
      Mit zusätzlichen Leitungen in der seriellen Schnittstelle (also neben RXT und TXT noch zusätzlich CTS und RTS, also vieradrig).
      Dann sendet der Sender nur dann wenn der Empfänger mitteilt, dass dieser auch Empfangsbereit ist.

      Im Übrigen hast du am PC ja sogar eingestellt "Flusssteuerung=Hardware" was dann wenig Sinn macht wenn dein Sender das gar nicht tut.
      Wenn du aber diese zusätzlichen Leitungen gar nicht hast, wird das nicht funktionieren.

      Alternativ könntest du nach jeder Zeile eine kurze Pause einfügen. Dann hat der Empfänger auch eine Chance die Daten zu verarbeiten.
    • Zitronenfalter schrieb:

      Mit zusätzlichen Leitungen in der seriellen Schnittstelle (also neben RXT und TXT noch zusätzlich CTS und RTS, also vieradrig).
      Dann sendet der Sender nur dann wenn der Empfänger mitteilt, dass dieser auch Empfangsbereit ist.
      Hi Zitronenfalter;

      ist das alles?
      reicht es aus, wenn ich nur die physikalische Verbindung CTS und RTS verdrahte?
      und der Chip MAX232N weis was zu machen ist?
    • katipefendi schrieb:

      weis was zu machen ist?
      Nein, er ist nur Pegelanpasser. Sie müssten auch mit dem Avr verbunden werden und der muß sie auch noch beachten. Das der PC mit der eher kleinen Baudrate Probleme hat ist umwahrscheinlich- wieviel CPU Auslastung hat der denn? Schon ein anderes Terminalprogramm versucht oder einen Usb2TTL Adapter?
      Natürlich sollte die Flußsteuerung auf keine stehen aber bei mir macht es keinen Unterschied. Wenn etwas losplappert nimmt er alles was kommt. Einen Überlauf kenn ich nur von trödelnen Basic Programmen nicht von Terminals. Hterm schafft es nicht mehr anzuzeigen wenn zu viel kommt verliert aber keine Zeichen und das sollte bei Hyperterm auch so sein?
    • Hallo Katipefendi,
      Die Flußsteuerung beim Terminal prog. rauszunehmen wäre der erste Versuch zur Besserung. Eine solche in deinem Prog auf dem AVR zu implementieren wäre meine letzte Wahl.
      Wie ist deine Fuse- Einstellung bzgl. Clock-Div. by 8?
      Gruß Rudi
      Immer Glück haben ist fast wie können..

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Rudi Einstein ()

    • Da ich eh grad mit der Seriellen rum bastle hab ich das mal getestet.

      Quellcode

      1. $regfile = "m1284pdef.dat" ' eingesetzter Mikrocontroller
      2. $crystal = 8000000 '18432000
      3. $loadersize = 1024 ' eingestellte Taktfrequenz
      4. $hwstack = 100
      5. $swstack = 80
      6. $framesize = 700
      7. $baud = 115200 '38400
      8. $baud1 = 9600
      Intern auf 8MHZ umgestellt. Termite verschluckt kein einziges Zeichen.