Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Intelligent Devices RF Control System with Feedback

Status
Not open for further replies.
If let say now I will go on with the PIC..I wanna know the PIC can be used to store data?And when I need to retrieve it, what changes I need to do.
Another question just for knowledge.,we know that in the flash, we need the timing to do all the process and the timing is created using CPU or microprocessor...Is it we have other way to create the timing if we are not using the flash memory together with the CPU and microprocessor?
 
Yes, most have built in EEPROM memory, and also the built in flash (program memory) can be read and writen to.

How much data do you need to hold?
What type of data do you need to hold?

Most external memory have there own timming specifications, and the Pic has lots of different built in interfaces, others can be implemented by how the program is writen.(simple turning pins on or off a the right time)

Kent
 
Actually if the PIC is applicable, I plan to use it as the storage for the address (ID) of the device. Just Imagine I have 8 devices and every device will have different address. I need to awake this address through RF signal to turn on this devices. :cry: SOmemore, it will be the best if I can change the address of the device from time to time. What I mean is let say the address for the FAN is 100 at this time, on the next time, if I need to change the address to 101, is it posibble to use the PIC by overwritten the data? Beside, I also need to extract the data(ID of device) out from the PIC as the feedback of my project. This feedback is to let the user know about the current condition of the device.
:)
Do u have any suggestion and tutorial about the storage managing of PIC with the model PIC16F84? :?:
 
chinngap said:
Actually if the PIC is applicable, I plan to use it as the storage for the address (ID) of the device. Just Imagine I have 8 devices and every device will have different address. I need to awake this address through RF signal to turn on this devices. :cry: SOmemore, it will be the best if I can change the address of the device from time to time. What I mean is let say the address for the FAN is 100 at this time, on the next time, if I need to change the address to 101, is it posibble to use the PIC by overwritten the data? Beside, I also need to extract the data(ID of device) out from the PIC as the feedback of my project. This feedback is to let the user know about the current condition of the device.
:)
Do u have any suggestion and tutorial about the storage managing of PIC with the model PIC16F84? :?:

It's all easily done with a PIC, check my RS232 PIC tutorials, one of those stores the state of the output pins in the EEPROM, and restores it to how it was if the power is turned off.

You can either change the data in your source code, and reprogram the PIC, or change it under program control - if it's stored in the DATA EEPROM.
 
HI.... :oops: is me again.. OK..Now I am using the :arrow: PIC16F84 for my storage of my project. So, now, my idea is to store the ID Address of the devices. Each address will only take up 3 bits. So, I am thinking of using the PORT A of the PIC as the output to the comparator to compare with the address sent out from the decoder. If the address matchm then it will trigger the device on. If it is not, the device will not turn on. If the user tends to modify the address of the device, a command bit will send out so that the previous address of the device will be overwritten with the new one.

:idea: Then I am thinking that to use PORT B as the input. This input is for the user to input the address they wish to turn on a particular device.
Then I was thinking that can I move the device ID address(3 bit RB0,RB1,RB2) in the PORT B which is the new ID, to the PORT A(RA0,RA1,RA2) so that the next time...when i need to switch on the device, PORT A will output the address to the comparator.

The moving of data from PORT B to PORT A is programmed at the beginning?And is it mean that the PIC itself will automatic move the data from PORT B to PORT A whenever PORT B had received the data?

:?: Is it posibble to have such an idea. And, also, can u give me the example code for that function? :)
 
chinngap said:
HI.... :oops: is me again.. OK..Now I am using the :arrow: PIC16F84 for my storage of my project. So, now, my idea is to store the ID Address of the devices. Each address will only take up 3 bits. So, I am thinking of using the PORT A of the PIC as the output to the comparator to compare with the address sent out from the decoder. If the address matchm then it will trigger the device on. If it is not, the device will not turn on. If the user tends to modify the address of the device, a command bit will send out so that the previous address of the device will be overwritten with the new one.

I don't quite see what you are trying to do, the mention of a comparator seems extremely bizzare!.

You simply do all this internally in the PIC, far easier!. As I mentioned above, check my IR PIC tutorials where I show how to receive Sony SIRC's remote control signals - in those I compare the incoming data to various possibilities to select different options.

:idea: Then I am thinking that to use PORT B as the input. This input is for the user to input the address they wish to turn on a particular device.
Then I was thinking that can I move the device ID address(3 bit RB0,RB1,RB2) in the PORT B which is the new ID, to the PORT A(RA0,RA1,RA2) so that the next time...when i need to switch on the device, PORT A will output the address to the comparator.

The moving of data from PORT B to PORT A is programmed at the beginning?And is it mean that the PIC itself will automatic move the data from PORT B to PORT A whenever PORT B had received the data?

:?: Is it posibble to have such an idea. And, also, can u give me the example code for that function? :)

You need to rethink your entire scheme, everything can be (and should be) done inside the PIC.

Try posting a ciruit of what you are trying to do, it may help make things clearer!.
 
:oops: I am sorry that I made u blur of my project. I had go through the important things of the datasheet in the PIC, However, here I have some questions. :? :? :?

1. Is that our set of program is stored in the EEPROM?
2. Is it mean that if I want to chnage the address of the device, I am chnaging the data in the RAM side and send it to the EEPROM?
3. I wonder to know that because my data is keep on changing (not the program of course) so evertime I need to retrieve the data..and also, I need to store the data as well...is it posibble?
4. I cant find the Sony things that u mean...sorry.. :oops:

:) Thanks for helping...I will try to have a circuit and post it to you as soon as posibble...But meanwhile, can u teach me how to program the PIC so that I be able to store something in EEPROM and change the important data when I need.(the data will come from the PORT B which I will use it as my input.)

Once again thansk...

by a fainted person... :?:
 
As we know, the flash needs a lot of timing to execute the operation of it, my question is "Is it possible to use the PIC to generate the timing and the sequence of the operation inside the FLASH MEMORY?" Thank U... My idea is using the delay which correspond to the actual timing needed for the flash memory.

Thanks
 
chinngap said:
As we know, the flash needs a lot of timing to execute the operation of it, my question is "Is it possible to use the PIC to generate the timing and the sequence of the operation inside the FLASH MEMORY?" Thank U... My idea is using the delay which correspond to the actual timing needed for the flash memory.

Thanks

What FLASH memory are you talking about?. If you are refering to the internal PIC memory, it's EEPROM not FLASH - a 16F84 can't write to it's own program memory (only the data EEPROM), but some of the larger PIC's (like the 16F877) can write to program memory - which allows the use of bootloaders.
 
Nope, I do not mean the PIC. What I mean is the FLASH MEMORY, a single chip such as the model AMD28F26. I just wish to know whether I can generate the timing using the PIC as I know that in order to execute the write or read operation to the flash memory chip, I need a lot of timing. And I know the by calling the delay in the PIC, I can have the timing I wish to have.

Do U think this is possible to be done with the help of the PIC? Thanks Nigel!
 
chinngap said:
Nope, I do not mean the PIC. What I mean is the FLASH MEMORY, a single chip such as the model AMD28F26. I just wish to know whether I can generate the timing using the PIC as I know that in order to execute the write or read operation to the flash memory chip, I need a lot of timing. And I know the by calling the delay in the PIC, I can have the timing I wish to have.

Do U think this is possible to be done with the help of the PIC? Thanks Nigel!

Certainly generating fairly accurate timing is quite easy with a PIC, so that shouldn't cause any problems. The main problems are likely to be the format that the FLASH memory uses, unless you are using your own formatting? - often FLASH memories are formatted in a simlar way to a disk drive, and a PIC doesn't really have enough RAM to deal with it.
 
Another way could be, use a larger pic. Have it write to its own Flash, or EEPROM.
Or use an external flash with a SPI or I2C interface.

Why do you want to use this type of external flash?
What are your needs?

Kent

ps. I just found a data sheet for a Am28F256, and the interface is quite complex, it looks like it needs 15 address lines and 8 data lines.
I have never used one of these, so I don't know the correct interface.
But my thought is that a serial interface would be easer, most Pics have them built in.

Some day I need to reprogram a simular chip for the CMOS in a older PC. I might know more then.

Please let Us know more details......
 
Hi, is me again. This time, I attached the schematic of my prject which I design myself. Can U look at it and tell me is it ok?

Here are some of the things needed to be taken note in the schematic:-
1. D0, D1 is command bit, when D0=0, D1=1 then on/off device will try
to operate the PIC to the on off device subroutine. If D0=1,D1=0,
then subroutine to change group address will be call. (This address will
be checked everytime before any operation is carried out. It is carried
in D2, D3, D4 which are connected to RA2, RA3 and RA4 respectively.)

2. D5, D6 and D7 connected to RB0, RB1, RB2 respectively. These 3 bits
will carry the device ID which indicate which device is switched on.
However, when the operation has change to change address (which
indicate by D0(RA0)=1, D1(RA1)=0), these 3 bits will store the new
address to overwrite the old group address.

3. RB3 is the output pins that I use to trigger on the demultiplexer
(74AC11138) and also the feeback encoder when the on/off subroutine
is called.

4. RB4 is the output pin that I use to trigger on the feeback encoder when
change address subroutine is called.

5. RB5 , 6, and 7 are unused pins.

6. I use the OSC2 pin of PIC and connect a resistor(330K) parallel with
capacitor (220nF) for oscillation function. Is this a need? :?:

-------------------------
My concern..sorry oh..
1. Does my connection ok?
2. Do I need to connect a resistor to every input pin in order to protect
the PIC?
3. OSC1 need to connect?
4. OSC2 need to connect?
5. The MCLR connected to high always right?

------------
My PIC Program , I will upload it in the next post reply. And Also my question is I already test the program with MPLAB and it shows OK, NO ERROR. Hwoever I cant get the output. Can U just have a look on my program.?

Is there any software that we can simulate the PIC on the computer screeen itself/?
Thanks, Hope my question is not making U feel angry..Thans very much!
 

Attachments

  • schematic_105.jpg
    schematic_105.jpg
    119 KB · Views: 571
This is my PIC Program MOdel of PIC is PIC16F84.

Can u explain to me inside ur SONY program, there is one line "goto $-1"
what is that for?
THanks A LOTS!!! :oops:
 

Attachments

  • pic.txt
    4.3 KB · Views: 159
chinngap said:
This is my PIC Program MOdel of PIC is PIC16F84.

Can u explain to me inside ur SONY program, there is one line "goto $-1"
what is that for?
THanks A LOTS!!! :oops:

$ is an assembler directive, it's explained in the MPASM help file.

Basically $ is the current address, so "goto $-1" means jump back one line, it's a convenient way of doing a small jump without the complications of labels.

As for your oscillator query, the 16F84 requires a resistor and capacitor for an RC oscillator - if you replace the obselete 84 with it's replacement, the 16F628, it has a fully internal 4MHz oscillator - this gives you 16 I/O pins, and is cheaper than the old 84.
 
Thansk Nigel. By the way, can u spend some time on my schematic diagram and try to give me some opinion on my questions? Sorry, :oops: :oops: :oops: Thansk a lots.........I have no choice but to use the PIC16F84 because I have bought it. For my case, the timing issue will be a problem? Thanks...
 
chinngap said:
My concern..sorry oh..
1. Does my connection ok?

I'm rather confused as to what all the chips are doing?, it seems pointless using the Holtek chips when the PIC can quite easily perform the functions of both?. If you look at my remote control tutorials I transmitt and receive Sony SIRC remote control signals, it would be trivial to modify those routines to do what you want.

2. Do I need to connect a resistor to every input pin in order to protect
the PIC?

No.

3. OSC1 need to connect?

Yes, as I remember it's the RC oscillator pin.

4. OSC2 need to connect?

No, unless I remembered wrong, and this is the RC oscillator pin.

5. The MCLR connected to high always right?

Yes.

You seem to have concerns over timing accuracies, if so you should be using a XTAL oscillator - the external RC oscillator is the most inaccurate you could possibly use!. On the 16F84 you don't lose anything by using a crystal, unlike the 628 the OSC pins are fixed and can't be used as I/O.
 
In PIC16F84, What is the difference of using a subroutine to perform an operation and using an interrupt to perform an operation. In this case, I need to perform an operation only when certain inputs receive data.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top