Topics Topics Edit Profile Profile Help/Instructions Help Member List Member List  
Search Last 1|3|7 Days Search Search Tree View Tree View  

Re: questions on pic16f690

:: EPE Chat Zone :: Radio Bygones Message Board :: » EPE Forum Archives 2005-2006 » Archive through 13 August, 2006 » Re: questions on pic16f690 « Previous Next »

  Thread Last Poster Posts Pages Last Post
  ClosedClosed: New threads not accepted on this page        

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Sem_peng
Member
Username: Sem_peng

Post Number: 8
Registered: 03-2006

Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 06 August, 2006 - 04:56 pm:   Edit Post Delete Post Print Post

Hi,

Q1. Is there any 16 bits register. Example 0-7 bits are for a register. 8-15 bits are for b register. So that port A input can be store in a register. Port B input in b register.

Q2. Using port A, RA0 & RA1 and port C as input. How do I transmit the information out from those pins using TX?

Q3. At the RX, how do I separate this information? I want it to be in port A & port C?

Q4. Is there any compare command? Example port A, pin RA0 is high; it will do a certain command. RA0 is low; it will do another command.

Q5. Do I have to declare the memory address? Example org 0000h.

Thank you.

Regards,
Sem
Top of pagePrevious messageNext messageBottom of page Link to this message

Mikehibbett
Frequent Contributor
Username: Mikehibbett

Post Number: 520
Registered: 04-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 06 August, 2006 - 06:43 pm:   Edit Post Delete Post Print Post

Hi Sem,

Q1. Is there any 16 bits register.
A1. No. You only have 8 bit registers. You will have to write the code based on that fact.

Q2. You will need to explain more about what you want to do.

Q3. Same as Q2.

Q4. Is there any compare command?
A4. Yes; sublw, subwf. When you subtract a byte from another byte, you can use the status register to find out if the byte is the same, below or above.

eg

movfw rxchar
sublw 'A'
btfss STATUS, Z
goto rxcharIsNotA
goto rxcharIsA

Q5. Do I have to declare the memory address?
A5. Simple answer is yes. The assembler does not know what you are thinking. There are several different ways of doing this, depending on the assembler - some help you more than others.

Hope that helps.

Mike.
-----
www.drivesentinel.co.uk - Home build GPS Speed Camera Detectors
Top of pagePrevious messageNext messageBottom of page Link to this message

Sem_peng
Member
Username: Sem_peng

Post Number: 10
Registered: 03-2006

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 08 August, 2006 - 06:51 pm:   Edit Post Delete Post Print Post

Hi,

For Question 2 and 3

Pic 1 transmittering end will do the following.
Im reading the data on PortA and PortC, and then transferring the data using TX to the transmitter.

Pic 2 receiving end will do the following.
Similarly Im receiving same data on the RX pin. Then trying to transfer the received data at the ports.

Thank you.
Regards,
sem
Top of pagePrevious messageNext messageBottom of page Link to this message

Mikehibbett
Frequent Contributor
Username: Mikehibbett

Post Number: 524
Registered: 04-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, 09 August, 2006 - 08:48 am:   Edit Post Delete Post Print Post

Hi Sem,

You can implement a 'bit bashed' software UART. It's too involved for a simple forum reply, but maybe you could look at a microchip datasheet on the subject:

AN593 ( simple example, good enough for you )
AN555 more complicated example

Regards,

Mike.
-----
www.drivesentinel.co.uk - Home build GPS Speed Camera Detectors
Top of pagePrevious messageNext messageBottom of page Link to this message

Sem_peng
Valued Member
Username: Sem_peng

Post Number: 11
Registered: 03-2006

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, 10 August, 2006 - 05:55 pm:   Edit Post Delete Post Print Post

Hi,

Does that mean there is no other ways, which I can send port A and port C data out using TX? Cause Im using two ports to get data.

Regards,
Sem
Top of pagePrevious messageNext messageBottom of page Link to this message

Mikehibbett
Frequent Contributor
Username: Mikehibbett

Post Number: 525
Registered: 04-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, 10 August, 2006 - 09:02 pm:   Edit Post Delete Post Print Post

There are many, many ways that you can transfer data. Only limited by your imagination.

Why dont you suggest an idea that you think might work; we can then let you know what we think about it.

regards

Mike
-----
www.drivesentinel.co.uk - Home build GPS Speed Camera Detectors

Administration Administration Log Out Log Out   Previous Page Previous Page Next Page Next Page