- This topic has 3 replies, 3 voices, and was last updated 9 years, 11 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › Monitoring a slow pulsing input bit, pulse every 1 sec or 3 sec, Ideas?
I would like to have an 8051 watch the network LED line of a SIM300 GSM/GPRS module. I'm hoping to find a best starting point from someone experienced, and or sample code. I could find no examples.
When the module is unregistered on the network, the LED blinks about 2/sec. Once registered the rate drops to 3-4 seconds. (I have the exact rates on the SIM300 data sheet)
I'm working with a small chinese project board having a SIM300 with 8051 on-board controller, that already monitors the network LED status (on P3.3 Int1), and restarts the SIM300 of/when the SIM300 looses registration, pauses a few seconds and continues. But, the seller of these boards supplies only the hex code of the module monitor, not the assembly or C version. I would like to recreate their technique with my additional code for other functions.
For my test project, I would like to illuminate one LED to indicate Unregistered and a second LED for Registered maybe. Or a status display on an LCD.
I will just use another 8051 Blinking an LED for test input.
Would this be best managed by using the timers? is the INTerupt input a clue as to how the board maker is accomplishing this?
Any suggestions or examples appreciated.
You can use 74HC590 8-bit binary counter, i tried it on arduino mega it worked fine. It can detect pulses in any pattern and length. Additionally you can use 74HC595 to reduce pin count that binary counters need.
But, I'm working with a small chinese PC board having a SIM300 with 8051 on-board controller that is setup to monitor the network LED status (on P3.3 Int1).
I want to us the direct connection to P3.3 to monitor as the board is designed.
enable timer interrupt and start timer
count number of timer interrupts to generate time period of 1sec
in this 1 sec time count number of time external interrupt occurs on P3.3
after 1 sec time interval based on that count take the decision