<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How can i create a new device in the database?</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/29168/how-can-i-create-a-new-device-in-the-database</link><description> 
Hello, 
I work at CTI Design House -Brazil ( http://www.cti.org.br ) and we develop a
microcontroller based on the 8051. However, our microcontroller uses
registers that are not available in 80C51 listed in the database. I&amp;#39;m
having problems when I try</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: How can i create a new device in the database?</title><link>https://community.arm.com/thread/119704?ContentTypeID=1</link><pubDate>Sat, 19 May 2012 01:21:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bee1ddda-cd35-43f0-9d15-2b8e1a8e560a</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
This is described in the uVision &lt;b&gt;Manual:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/support/man/docs/uv4/uv4_ca_cpu_ndatabase.htm"&gt;http://www.keil.com/support/man/docs/uv4/uv4_ca_cpu_ndatabase.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/support/man/docs/uv4/uv4_c_dd_parameters.htm"&gt;http://www.keil.com/support/man/docs/uv4/uv4_c_dd_parameters.htm&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i create a new device in the database?</title><link>https://community.arm.com/thread/106022?ContentTypeID=1</link><pubDate>Fri, 18 May 2012 16:05:55 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6f6d6ee5-4609-45d7-be80-471ce32013a0</guid><dc:creator>doubt that my ISP Al Bradford</dc:creator><description>&lt;p&gt;&lt;p&gt;
To answer the original question. You can modify some things in a
device data base. First go to File -&amp;gt; Device DataBase... and open
the dialog. Carefully select a device as near to your device as
possible(carefully read the device descriptions). To make a copy of
the existing device data base, change the name, device family and
device type to your device names, etc. Modify the any data necessary
and click the Update AND the the ADD button. At this point you can
define the register .h files that you have created to define your
register set. This is just your Regxxx.h file that you have created.
You can change other device descriptions as necessary.&lt;/p&gt;

&lt;p&gt;
Now the real hard part. If you have peripherals not common to the
device that you select to change, you must write your own peripheral
types using the AGSI and/or the AGDI features in this toolset. These
new tools will be written in C++ external to the Keil Tools and you
will create a new .dll for your simulator. Templates are availble on
this website.&lt;/p&gt;

&lt;p&gt;
All of this is described in detail in the PK51 User&amp;#39;s Manuals at
this website. You must read and study these manuals carefully to
implement any serious changes to the Device Database.&lt;/p&gt;

&lt;p&gt;
Good Luck. You will need it.&lt;/p&gt;

&lt;p&gt;
Bradford&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i create a new device in the database?</title><link>https://community.arm.com/thread/140248?ContentTypeID=1</link><pubDate>Fri, 18 May 2012 07:36:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e8f831e3-18af-4c46-bba3-c51c0908fdf4</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i create a new device in the database?</title><link>https://community.arm.com/thread/131012?ContentTypeID=1</link><pubDate>Fri, 18 May 2012 07:12:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:60afe2ed-229f-4248-9cc3-590b5d7b1300</guid><dc:creator>Claudionor Santos</dc:creator><description>&lt;p&gt;&lt;p&gt;
thanks ,&lt;/p&gt;

&lt;p&gt;
i just could not understand when you wrote &amp;quot;this is
ridiculous.&amp;quot;&lt;/p&gt;

&lt;p&gt;
could you be clear ?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i create a new device in the database?</title><link>https://community.arm.com/thread/127518?ContentTypeID=1</link><pubDate>Fri, 18 May 2012 07:01:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:84a28e83-8fc3-4df4-af2c-9dfb5980a242</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
startup.a51 included in the linking string&lt;/p&gt;

&lt;p&gt;
check the .map&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i create a new device in the database?</title><link>https://community.arm.com/thread/116840?ContentTypeID=1</link><pubDate>Fri, 18 May 2012 06:43:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:48357a0a-2f34-4dcf-93fc-4df644c5c19c</guid><dc:creator>Claudionor Santos</dc:creator><description>&lt;p&gt;&lt;p&gt;
Erik&lt;/p&gt;

&lt;p&gt;
it is a assembly code.&lt;/p&gt;

&lt;p&gt;
full code :&lt;/p&gt;

&lt;pre&gt;
#define         Result_final 0f8h
;*********** Tabela de EQU para as Variaveis em RAM
VEZES EQU 8 ; conta o n&amp;uacute;mero de vezes de interrup&amp;ccedil;ao I2C

;********************************************************************
; ENDERECO DE DESVIO SAIDA DE RESET
cseg    at      0000h
AJMP    200h
;********************************************************************
; ENDERECO DE DESVIO DA INTERRUPCAO INT0
;cseg   at       0003h
;AJMP   0050h
;*********************************************************************
;********************************************************************
; ENDERECO DE DESVIO DA INTERRUPCAO DO TIMER/COUNTER 0
;cseg   at       000Bh
;AJMP   0050h
; ENDERECO DE DESVIO DA INTERRUPCAO DO INT1
;cseg   at  0013h
;AJMP   0070h
;*********************************************************************
;*********************************************************************
; ENDERECO DE DESVIO DA INTERRUPCAO DO TIMER/COUNTER 1
;cseg   at  001Bh
;AJMP   0070h
;*********************************************************************
; ENDERECO DE DESVIO DA INTERRUPCAO DO CANAL I2CSM
cseg    at 02Bh                 ; I2CSM interruption
AJMP    100h
;*********************************************************************
;*********************************************************************
; ENDERECO DE DESVIO DA INTERRUPCAO DO CANAL SERIAL
;cseg   at 0023h                        ;serial interruption
;               AJMP    0100h
;*********************************************************************
;*********************************************************************

cseg    at 100h
MOV     0F0h, 0E8h ; MOVES STATUS REG TO ACCUMULATOR
jb              0F1h,   msb_interrupt ; Status Register bit 1 - E8.1
jb              0F0h,   lsb_interrupt ; Status Register bit 0 - E8.0
jb              0F2h,   nack_interrupt ; Status Register bit 2 - E8.2
mov     R2, 0E8h
cjne    R2, #042h, test_lsb_interrupt
ajmp    msb_interrupt
test_lsb_interrupt:
cjne    R2, #041h, test_nack_interrupt
ajmp    lsb_interrupt
test_nack_interrupt:
cjne    R2, #044h, error_detected
ajmp    nack_interrupt
error_detected:
ajmp    error_02

msb_interrupt:
        mov             R0, 84h
        mov             0E8h, #80h ; FLAG Clear - E8    . Clear Interruption Flag
        inc     VEZES ; Incrementa o contador de interrup&amp;ccedil;oes
        cjne    R0, #0A2h, error_03
        reti

lsb_interrupt:
        mov             R0, 85h
        mov             0E8h, #80h ; FLAG Clear - E8    . Clear Interruption Flag
        inc     VEZES ; Incrementa o contador de interrup&amp;ccedil;oes
        cjne    R0, #0F8h, error_04
        setb    ACC.0
        reti

nack_interrupt:
        mov             R0, 84h
        mov             0E8h, #80h ; FLAG Clear - E8    . Clear Interruption Flag
        inc     VEZES ; Incrementa o contador de interrup&amp;ccedil;oes
        cjne    R0, #0F8h, error_04
        setb    ACC.1
        reti

error_02:
    mov     30h , R2
    mov     31h , 0E8h
    mov     Result_final, #003h         ;Interrupt error
error_03:
    mov     32h , R2
    mov     33h , 0E8h
    mov     Result_final, #003h         ;Recieve error
error_04:
    mov     34h , R2
    mov     35h , 0E8h
    mov     Result_final, #003h         ;Bit 8 receive error


;*********************************************************************
;       Configure 8031
;*********************************************************************
cseg    at  200h
SETUP_MCU:
    clr    RS0;
    clr    RS1;
    mov         R0, VEZES
    mov     A, R0
    CJNE    A,#0,MAIN_LOOP
    mov         PSW,    #00h    ; Move o valor do reg. PSW para 00h
    mov     IE,         #0C0h    ; Move o valor de C0h para IE, Habilita Interrupcao do I2CSM
    mov         PCON,   #000h
    mov     VEZES,  #001h   ; inicializa o contador de interrupcoes I2C
    mov         ACC,    #000h
;*********************************************************************
;       Start tranmission test
;*********************************************************************
 mov            0D8H,   #001h   ;---&amp;gt;&amp;gt;&amp;gt; Reg D8h n&amp;atilde;o implementado  I2CSM Habilitado
 mov            0D9h,   #000h   ;---&amp;gt;&amp;gt;&amp;gt; Reg D9h n&amp;atilde;o implementado   I2CSM Standard Mode  D9h
        mov             84h,    #0A2h   ;I2CSM Slave Address 0xA2 , Write Mode
        mov             85h,    #0F8h   ;I2CSM Write Data 0xF8
        mov     R5 ,  84h
        mov     R6 ,  85h
        mov     SP,     #10h
MAIN_LOOP:
    mov     R4 ,  0E8h
        CJNE    R4,#42,continue_MAIN_LOOP
        nop
        nop
        nop
    ajmp        error_01
continue_MAIN_LOOP:
        jnb             ACC.1, CHECK_I2C_LSB_INT_DONE;
        mov     R3, VEZES   ; CHECK_I2C_NACK_INTERRUPTION
        CJNE    R3,#02,error_01
        ajmp    test_completed
CHECK_I2C_LSB_INT_DONE:
        jnb             ACC.0, MAIN_LOOP;
        mov     R3, VEZES
        CJNE    R3,#03,error_01
test_completed:
        mov     Result_final, #001h             ;Test complet sussesfuly
error_01:
        mov     36h , R3
        mov     Result_final, #003h             ;Bit 8 receive error

        END

&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i create a new device in the database?</title><link>https://community.arm.com/thread/106017?ContentTypeID=1</link><pubDate>Fri, 18 May 2012 06:25:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8431d314-c775-4228-b2a7-4acfb4d17f0a</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;we develop a microcontroller based on the 8051.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
anyhow what ARE you doing?&lt;br /&gt;
mov 0E8, # 001h; is assembler and the error messages are from &amp;#39;C&amp;#39;&lt;br /&gt;
is seems like/could be that you include startup.a51 in an assembler
program&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i create a new device in the database?</title><link>https://community.arm.com/thread/80267?ContentTypeID=1</link><pubDate>Fri, 18 May 2012 05:38:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:303c4225-08b1-4ced-8c97-0d270f0c313d</guid><dc:creator>Claudionor Santos</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks,&lt;br /&gt;
it is working now !&lt;/p&gt;

&lt;p&gt;
But have some warning messages, like that:&lt;/p&gt;

&lt;pre&gt;
 *** WARNING L5: CODE SPACE MEMORY OVERLAP
    FROM:    0000H
    TO:      0002H
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
    SYMBOL:  ?C_START
    MODULE:  STARTUP.obj (?C_STARTUP)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL:  ?C_START
    MODULE:  STARTUP.obj (?C_STARTUP)
    ADDRESS: 080AH
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i create a new device in the database?</title><link>https://community.arm.com/thread/67476?ContentTypeID=1</link><pubDate>Fri, 18 May 2012 05:13:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4f015e58-75f1-4b5a-a555-7ab598070d4d</guid><dc:creator>Gp F</dc:creator><description>&lt;p&gt;&lt;p&gt;
what about this:&lt;/p&gt;

&lt;pre&gt;
MOV 0E8H,#1
MOV 0xE8,#1
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>