ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: TS 7200 serial port at full duplex

To:
Subject: Re: [ts-7000] Re: TS 7200 serial port at full duplex
From: Jason Stahls <>
Date: Thu, 17 Jan 2013 11:12:13 -0500
On 1/17/2013 10:54 AM, khouryelie wrote:
> hello jim
> thanks for the reply
>
>> I think you need to do a byte write - otherwise you are writing
>> hex 00 to 0x22C0_0000 0x22C0_0001 0x22C0_0002 and hex 01 to 0x22C0_0002
>> when you write the integer hex 01 to 0x22C0_0000
>>
>> Just try changing Made to unsigned char *
>>
>> Don't why you have the infinite loop!
>>
> first the loop was part of a test i forgot to remove before posting
>
> And i did the following:
> __________________________________________________________
> #include<sys/types.h>
> #include<sys/mman.h>
> #include<stdio.h>
> #include<fcntl.h>
> #include<assert.h>
>
> int main(void)
> {
>
>       int fd;
>          volatile unsigned char *base;
>
>          fd = open("/dev/mem", O_RDWR | O_SYNC);
>
>          base = (unsigned char 
> *)mmap(0,getpagesize(),PROT_READ|PROT_WRITE,MAP_SHARED,fd,0x22C00000);
>
>          *base = 0x01;
>
>          close(fd);
>       
>
> }
>
> it dosnt work,
> just i dont understand the following that i found in the manuel
>
>
> Value         MSB     MID     LSB     Mode
> 0x00  0       0       0       RS-232
> 0x01  0       0       1       Full-Duplex RS-485
> 0x02  0       1       0       -- Reserved
> 0x03  0       1       1       -- Reserved
> 0x04  1       0       0       Half-Duplex 9600 Baud
> 0x05  1       0       1       Half-Duplex 19.2Kbaud
> 0x06  1       1       0       Half-Duplex 57.6Kbaud
> 0x07  1       1       1       Half-Duplex 115.2Kbaud
>
> COM2 will default to RS-232 mode at reset (COM2 mode register = Hex 00). In 
> order to switch COM2 into Full duplex RS-485 mode, the COM2 Mode register at 
> 0x22C0_0000 must be set to Hex 01. In this mode, the TX drivers are always 
> asserted.
>
>
>
> ISNT *base=0X01; WHAT I SHOULD DO ?
>
> what do you mean by byte write ?
>
>
> one more thing this is what they say in the MEMORY AND REGISTER MAP
>
> register address: 0x22C0_0000
> function        : COM2 RS-485 control register (bits 0-2)

I don't know about the registers and values, but I can say you shouldn't 
be blanket writing to them.  Read the current value of the register, 
bitwise AND the values you want to change and write it back.

-- 
Jason Stahls


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU