Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - vitaliy

Pages: [1] 2 3 4 5 6 ... 14
1
Micro-IDE / Re: Example of using more Ram
« on: May 10, 2005, 01:52:06 pm »
#include <8051io.h>
#define OFFSET      0x300
struct _header
{
     unsigned char byte;
     unsigned int  word;
};

unsigned char GetExpandData( unsigned int address)
{
     asm
     {
           MOV A,#-3
           ADD      A,SP            Adjust for stack offset
           XCH      A,R0            
           MOV DPL,[R0]
           INC R0
           MOV DPH,[R0]
           MOVX A,@DPTR
           RET
     }
}
void SetExpandData( unsigned int address,unsigned char data )
{
     asm
     {
           MOV A,#-5
           ADD      A,SP            Adjust for stack offset
           XCH      A,R0            And restore order
           MOV DPL,[R0]
           INC R0
           MOV DPH,[R0]      
           INC R0
           MOV      A,[R0]
           MOVX @DPTR,A
           RET
     }
}
register unsigned int G_offSet;
void memset (register unsigned char* dest,
                             register unsigned char* source,
                                   unsigned int  len)
{
     unsigned int address;
     unsigned char ndx;
     address = dest + G_offSet;
     for (ndx =0 ; ndx < len; ndx++)
           SetExpandData(address++,*source++);
     
}                                        
void memget (register unsigned char* dest,
                             register unsigned char* source,
                                   unsigned int  len)
{
     unsigned int address;
     unsigned char ndx;
     address = source + G_offSet;
     for (ndx =0 ; ndx < len; ndx++)
           *dest++ = GetExpandData(address++);
}                                    

void main()
{
     unsigned int address;
     unsigned char dataByte;
     unsigned int  dataWord;
     struct _header *pt;
     serinit(9600);
     asm
     {
           MOV 8EH,#0CH       ; Enable Expanded memory
; Clear all locations of expanded memory      
           MOV DPTR,#0
NEXT:            
           CLR      A
           MOVX @DPTR,A
           INC      DPTR
           MOV      A,DPH      
           JNB      ACC.2,NEXT                  
     }
     pt =0;
     G_offSet = OFFSET;      // set offset inside of Expanded memory
//      
     dataByte = 0xA5;
     dataWord = 0x1234;
     memset(&pt->byte,&dataByte,sizeof(pt->byte)); // write byte
     memset(&pt->word,&dataWord,sizeof(pt->word)); // write word      
//      
     dataByte = 0x00;
     dataWord = 0x0000;
     memget(&dataByte,&pt->byte,sizeof(pt->byte));  // read byte
     memget(&dataWord,&pt->word,sizeof(pt->word));  // read word
//      
     printf("\\ndataByte = %02x ",dataByte);
     printf("\\ndataWord = %04x ",dataWord);

     
                 
     for(address= 0; address < 0x400; address++)
     {      
           if(!(address % 16))
           {
                 printf("\\n%04x ",address);
           }      
           printf("%02x ",GetExpandData(address));
     }
     for(;;);

}

2
Micro-IDE / Re: how to use port pin as a variable?
« on: April 01, 2005, 12:48:48 am »
setbit(SDA);
setbit(SCL);
clrbit(SDA);
clrbit(SCL);

3
Micro-IDE / Re: passing parameters to assembler
« on: December 09, 2004, 12:22:20 pm »
You can create some simple C functions and research LST file in order to understand which mechanisms are implemented  to pass  parameters.

4
Micro-IDE / Re: How to add a new Toolkit to Micro-IDE ?
« on: November 27, 2004, 01:54:09 am »
The latest 8051/52 development system is updated on WEB.
Please download  http://www.bipom.com/devsys/8051dev.zip and install it to your PC.
The newest release contains the improved help and a lot of new examples.
Run Micro-IDE and click Help->Micro-IDE Help (8051 Development system).
"Customizing Toolkits" chapter explains how to add a new toolkit in details.

5
Micro-IDE / Re: Serial Initialization
« on: June 16, 2004, 09:42:10 am »
serinit(9600);     /* initialize serial port */
TH1 = 0xFF;      /* baud rate = 22118400/384/(256-TH1) = 57600 */
PCON |=0x80;   /* baud rate = baud rate x 2 = 115200 */  

6
Micro-IDE / Re: Minimax-51/C board Eeprom
« on: June 16, 2004, 09:39:38 am »
EEPROM uses P1.6 and P1.7 port pins of 8051 CPU.
Please download and see the schematics in MINI-MAX/51-C Technical  Manual. P1.6 is clock and P1.7 is data.
There is an example project for the EEPROM under \\bipom\\devtools\\microc\\examples\\8051\\eeprom\\24c512.
PIC16C58  is also on the same I2C bus. Main 8051 uses I2C to send commands to the PIC to set the LCD contrast level. PIC can also access the EEPROM directly to modify the EEPROM using WinLoad software from a PC while 8051 is not running.
Also, please see examples under C:\\bipom\\devtools\\MicroC\\Examples\\8051\\tiny\\mm51cTest (
note, the newest release on WEB contains these examples only).
Best regards, Vitaliy  :)

7
Micro-IDE / Re: .hex file
« on: May 27, 2004, 03:22:23 am »
I have already compiled and sent  the 4reed propject to you
Best regards,
Vitaliy

8
Product Suggestion / Re: control of 20 dc motors
« on: February 01, 2011, 09:21:52 am »
Hi Fred,
please look at Scheduled Device Control using MINI-MAX/51-C2
http://www.bipom.com/software_examples/us/1.html
Maybe it is a good start point for your application.
Note, you can connect many peripheral boards to
MINI-MAX/51-C2

10
LCD Displays / Re: Seen the Micro-IDE Terminal in LDC
« on: August 13, 2010, 01:03:39 am »
Micro-IDE terminal is based on UART.
LCD is based on a 4-bit parallel interface.
In other words, totally different physical devices.
It means you have to send the same messages to both interfaces.

11
LCD Displays / Re: Seen the Micro-IDE Terminal in LDC
« on: August 12, 2010, 12:11:19 pm »
Install 8051/52 development system and look at
C:\\bipom\\devtools\\MicroC\\Examples\\8051\\tiny\\LCD\\c

12
LCD Displays / Re: Curspr position
« on: March 27, 2005, 02:05:28 am »
/***************************************************************************
; Function:       SetCurrentTextPosition
;
; Description:      sets the cursor position to the <column>
;                        and <row> specified.
;
; Inputs:          UBYTE column
;                        UBYTE row
;
; Returns:         nothing
;**************************************************************************/
void SetCurrentTextPosition(UBYTE column, UBYTE row)
{
     /* Combine address & command */
     if ( row == 1)             column |= 0xC0;      // for bottom line
           else                    column |= 0x80;      // for top line
     /*  Send command to LCD */      
     WriteCtrl(column>>4);                  
     WriteCtrl( column & 0xF);
}

Please try this function

13
OLED Displays / Re: Interesting information about activation
« on: April 25, 2011, 06:22:58 am »
Please explain in details what you mean.
Do you have problems with OLED-1 peripheral board ?

14
GadgetPC / Re: dataflash - loose the uboot
« on: December 12, 2011, 01:05:49 pm »
U-boot has non-volatile memory to save the current settings
Command is saveenv
This allows your environment variables to persist across power cycles and reboots.

15
GadgetPC / Re: dataflash - loose the uboot
« on: June 08, 2011, 11:17:08 pm »
Please download and install
http://www.bipom.com/files/gadgetpc/gadgetpc_setup.exe
from
http://www.bipom.com/web_softwares/2899678.html

You will find  GadgetPC_USB_loader.bin under C:\\bipom\\devtools\\GadgetPC\\loader

Pages: [1] 2 3 4 5 6 ... 14