This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Mon51 funktioniert nicht mit externer Uart

Ich habe versucht Mon51 mit der externen Uart in Betrieb zu nehmen - leider erfolglos.
(es kommt keine Kommunikation mit µVision zustande)
Mit der internen Uart funtioniert es.

Mon 51 mit der externe Uart habe ich mit folgenden einstellungen generiert:
install.bat 6 7F 80

für Mon51 mit der internen mit
install.bat 9 7F 80

den bauddiv. für die externe Uart habe ich in install.a51 auf 0xC eingestellt (1.843200 MHz / 9600 Bad)

Die Externe UART befindet sich im Bereich zwischen 0xE400 - 0xE7FF.
Wenn ich auf die externe Uart mit einem Programm zugreife funktioniert das Senden und Empfangen ohne Probleme.


Ich hoffe jemand kennt eine Lösung.

Vielen Dank im voraus.

Frank Keubler

Parents
  • yes -- i know that it should support external uart - i will use this and i read many many times the manual.

    I also know the install.a51

    My uart is at this moment in the same Xram (and Code space - as descibed in manual {chapter 3/page 14})

    At this time i used the same configuration as the Keil eval board - but the unused I/O are used for my specific hardware enviroment)

    This is not the problem.

    I had some questions about the install.a51
    **********************************************************************************
    1. -- how would for serialtype 6 the bauddiv register initialised?

    Ok -- i see the formel :
    BAUDDIV EQU (SIOCLK / 16) / BAUDRATE

    this is correct -- but the parser cant handele the value of SIOCLK if this is bigger 65535 - <and so the generated value for Bauddiv is 0 -- from where i know it?
    i see it in the disassembled generated mon51.hex

    the next problem -- in the hardware manual for the external uart the interrupt IE0 is used - how ?
    did somewhere see a using of this in install.a51?

    I see at IE0 the code :
    LJMP INT_ADR_OFF + 03H

    if external uart is used for me should then stay at IE0 - location

    LJMP SER_ISR

    the next question

    If the external int is used by the monitor then how ?

    if serial 6 is used in install.a51 the

    I see in the serial 6 section the following:

    SER_INT_ADR EQU 23H ;

    is used, why ?

    I think external serial interrupt bin is connected to IE0

    so for me there should stay
    SER_INT_ADR EQU 23H ;

    ok... it would be nice if someone can answer my questions.

    A other solution would be if someone have a MCBx51 board.


    I can use the monitor memory dump and load it in the simulator of keil to see what is going on to use the external Uart -or what my mistake is.

    for this if someone have the MCBx51 he must go following steps.
    Set :
    Uart_INT: ON
    ext_Uart : ON
    PAGE: OFF
    Monitor: ON
    51/151: ON

    if this setting are correct,start the µvision debugger - with communication over
    external uart.

    in the debugger command window type in the following command:

    save Monitor.hex C:0xE000, C:0xFFFF


    send this to my e-mail.
    Solo_Frank@web.de

    with this -- i find the right solution.

    best regards,
    Frank



    > You may have to actually try a copy-n-pasted version of it in your test program to be completely sure. <

    The initialisation from install.a51 was used for test.

    For the readout and writing to the uart i write some routines to emulate the readou and writing of the monitor....
    But -- i didnt know how it is realized in mon51.lib

Reply
  • yes -- i know that it should support external uart - i will use this and i read many many times the manual.

    I also know the install.a51

    My uart is at this moment in the same Xram (and Code space - as descibed in manual {chapter 3/page 14})

    At this time i used the same configuration as the Keil eval board - but the unused I/O are used for my specific hardware enviroment)

    This is not the problem.

    I had some questions about the install.a51
    **********************************************************************************
    1. -- how would for serialtype 6 the bauddiv register initialised?

    Ok -- i see the formel :
    BAUDDIV EQU (SIOCLK / 16) / BAUDRATE

    this is correct -- but the parser cant handele the value of SIOCLK if this is bigger 65535 - <and so the generated value for Bauddiv is 0 -- from where i know it?
    i see it in the disassembled generated mon51.hex

    the next problem -- in the hardware manual for the external uart the interrupt IE0 is used - how ?
    did somewhere see a using of this in install.a51?

    I see at IE0 the code :
    LJMP INT_ADR_OFF + 03H

    if external uart is used for me should then stay at IE0 - location

    LJMP SER_ISR

    the next question

    If the external int is used by the monitor then how ?

    if serial 6 is used in install.a51 the

    I see in the serial 6 section the following:

    SER_INT_ADR EQU 23H ;

    is used, why ?

    I think external serial interrupt bin is connected to IE0

    so for me there should stay
    SER_INT_ADR EQU 23H ;

    ok... it would be nice if someone can answer my questions.

    A other solution would be if someone have a MCBx51 board.


    I can use the monitor memory dump and load it in the simulator of keil to see what is going on to use the external Uart -or what my mistake is.

    for this if someone have the MCBx51 he must go following steps.
    Set :
    Uart_INT: ON
    ext_Uart : ON
    PAGE: OFF
    Monitor: ON
    51/151: ON

    if this setting are correct,start the µvision debugger - with communication over
    external uart.

    in the debugger command window type in the following command:

    save Monitor.hex C:0xE000, C:0xFFFF


    send this to my e-mail.
    Solo_Frank@web.de

    with this -- i find the right solution.

    best regards,
    Frank



    > You may have to actually try a copy-n-pasted version of it in your test program to be completely sure. <

    The initialisation from install.a51 was used for test.

    For the readout and writing to the uart i write some routines to emulate the readou and writing of the monitor....
    But -- i didnt know how it is realized in mon51.lib

Children
No data