Hello guys,
First of all you guys are doing great job by developing such an easy to use tool, Well i know 7-bits doesn't make sense but let me ask, is there any way to put 7-bit data in a variable and that variable correspond to a 8-bit port so that whenever that variable is written only 7 pins should give the output(the data will not exceed more than 7-bits), the remaining one pin should left undisturbed.
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would just use the AND(&) operation to mask off the unwanted bit. There will always be some switching "noise" when
writing to a Port whether a particular pin is written to or not. In some cases the whole port is cleared before adding the W register to it, usually nothing to be concerned about?
'An example to write the 7 msb's of a variable to a port, excepting bit 7
Rotate MyVar Right Simple
PortA = MyVar & b'01111111'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your prompt reply, its really getting the job done. I marked your words about that noise thing since I am using that remaining pin as ADC input, Let me write it to my controller(and observe the noise) then I will get back to you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think i should better not use that port at all, mainly there are two reasons so far, first the masked bit is set always to low which is hindering the ADC input to move freely, second that noise thing, I was trying to use that port as RAM address counting high byte, anyways I have arranged a separate binary counter(CD4024) for high address byte which clocked by the MSB of the low byte port on controller. I appreciate your help Kent keep up the good work : )
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sounds like you have it figured out. The noise thing is a very fleeting thing that I saw on the scope, and by the time an a-d conversion looks at the pin, the very small glitch would be long gone. A 0.1uf bypass cap on the input pin for extra measure wouldn't hurt.
Hats off to Hugh, who has put together a very unique, and useful compiler.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello guys,
First of all you guys are doing great job by developing such an easy to use tool, Well i know 7-bits doesn't make sense but let me ask, is there any way to put 7-bit data in a variable and that variable correspond to a 8-bit port so that whenever that variable is written only 7 pins should give the output(the data will not exceed more than 7-bits), the remaining one pin should left undisturbed.
Thanks in advance.
I would just use the AND(&) operation to mask off the unwanted bit. There will always be some switching "noise" when
writing to a Port whether a particular pin is written to or not. In some cases the whole port is cleared before adding the W register to it, usually nothing to be concerned about?
Hello Kent,
Thanks for your prompt reply, its really getting the job done. I marked your words about that noise thing since I am using that remaining pin as ADC input, Let me write it to my controller(and observe the noise) then I will get back to you.
Hello Kent,
I think i should better not use that port at all, mainly there are two reasons so far, first the masked bit is set always to low which is hindering the ADC input to move freely, second that noise thing, I was trying to use that port as RAM address counting high byte, anyways I have arranged a separate binary counter(CD4024) for high address byte which clocked by the MSB of the low byte port on controller. I appreciate your help Kent keep up the good work : )
Sounds like you have it figured out. The noise thing is a very fleeting thing that I saw on the scope, and by the time an a-d conversion looks at the pin, the very small glitch would be long gone. A 0.1uf bypass cap on the input pin for extra measure wouldn't hurt.
Hats off to Hugh, who has put together a very unique, and useful compiler.