Jinx | 1 May 01:37
Picon

Re: [PIC] Project with LCD, keys and delays on PIC16F628A

>> many many many nops
>> nop
>> nop
>> nop
>> nop
>> bcf led
>> goto or return
>> 
> But how can I change the delays?

TBH Nick my suggestion is a bit of an 'adventurous' solution. It
would mean calculating the address that the code needs to jump
to (based on the length of the pulse required) and modifying the
program counter to do that jump. It could work but is fraught with
problems
--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Jinx | 1 May 01:54
Picon

Re: [PIC] Project with LCD, keys and delays on PIC16F628A

>> bsf ;set pin
>> nop ;if read-modify-write is a problem, which it isn't for the 18F
>> bcf ;clear pin

> That means you want to leave a cycle or two before and after
> the BSF/BCF, but don't need one between them.

Yes, that's fair enough. (The OP uses an LED in the example, although
I wonder what purpose there could be of a 1us pulse through an LED,
unless it's an opto perhaps). His later spec of the sequence of pulses
and their separation does make r-m-w problems less likely
--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Roger Weichert | 1 May 02:11
Picon

Re: [EE] Inverter Driver IC


----- Original Message ----- 
From: "Herbert Graf" <hkgraf <at> gmail.com>
To: "Microcontroller discussion list - Public." <piclist <at> mit.edu>
Sent: Friday, 01 May, 2009 7:16 AM
Subject: Re: [EE] Inverter Driver IC

> On Thu, 2009-04-30 at 22:50 +0930, Roger Weichert wrote:
>> I'm trying to locate a replacement IC for a board.
>>
>> It's a small 8 pin smd device  ..  fairly clearly marked MNAJ   S14B.
>

> Is the transistor a MOSFET? It might be worthwhile looking up the
> datasheet for it, this part sounds like it could be a MOSFET driver,
> most MOSFET manufacturers recommend certain driver chips, you might get
> lucky.

Turns out it is a MOSFET   ...   an IRFR220  ..  200Volt   5Amp  SMPS 
Mosfet.

I haven't had any luck finding suggested drivers for them yet, but will keep 
looking.

Thanks,  Roger

--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
(Continue reading)

Dwayne Reid | 1 May 02:34
Favicon

Re: [EE] Inverter Driver IC

At 06:11 PM 4/30/2009, Roger Weichert wrote:

>Turns out it is a MOSFET   ...   an IRFR220  ..  200Volt   5Amp  SMPS
>Mosfet.
>
>I haven't had any luck finding suggested drivers for them yet, but will keep
>looking.

Hi there, Roger.

Why not take a few minutes and trace out some of the pin connections 
to the chip.  You already know what the output pin is (it feeds the 
FET) and should be able to get an idea of which is the ground pin, 
feedback pin, etc.  Post what you find out and someone may recognize 
the chip just from the pin information.

FWIW - I've seen simple SMPS done with nothing more than a CMOS 555 
timer chip.  The output FET was fairly special, though, in that it 
had quite low gate capacitance.

dwayne

-- 
Dwayne Reid   <dwayner <at> planet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax
www.trinity-electronics.com
Custom Electronics Design and Manufacturing

--

-- 
(Continue reading)

Nick_F | 1 May 02:37
Picon

Re: [PIC] Project with LCD, keys and delays on PIC16F628A


Bob Blick-4 wrote:
> 
> I've been reading this thread and having a hard time following all the
> little pieces.
> 
> Is it possible to post the complete specs in one email? Because I don't
> really know if these three pulses are continuously recurring, are
> related to each other, etc. That would have a lot of effect on how the
> code was created. What happens to the pulses while a key is in the
> middle of being pressed, and vice-versa? etc etc.
> 
> Thanks,
> Bob
> 

Hi Bob,

I will give one more go to the specifications for the project. I realised I
ommited important information in my previous descriptions.

Microcontroller: PIC16F628A or PIC16F648A with 20MHz clock.
Programming language: assembler or C or both.
Production scale: one-off or very limited.
Application of project: generating control pulses for a metal detector.

The main purpose of the microcontroller is to generate a cyclical succession
of three pulses (Pulse1-Pulse3-Pulse3-Pulse1-Pulse2-Pulse3-etc). Each pulse
has to be generated at a different digital output of the microcontroller.
The temporal order of pulses is always Pulse1, Pulse2, Pulse3. Each pulse
(Continue reading)

Jinx | 1 May 03:29
Picon

Re: [PIC] Project with LCD, keys and delays on PIC16F628A

Nick, I've had a quick read of the constructional article

http://www.geotech1.com/pages/metdet/projects/hammerhead/HHv1p5.pdf

and it's a lot clearer now

So, there's an astable 555 running at 900Hz - 2300Hz with adjustable
duty cycle. This pulse train drives two 74HC221 monostables, which
in turn each output a delayed pulse with adjustable pulse width

The short answer is that this can be done fairly easily with the 628
using code suggested so far. PWM will work to replicate the original
555 train but as the other two need to be done in s/w you might just
as well use s/w for all

In the schematic

http://www.geotech1.com/pages/metdet/projects/hammerhead/HHd1.pdf

the controls are analogue (pots). It won't be possible to emulate this
exactly using pushbuttons without some disruption to the output until the
new values come into effect but in this app I don't think that's too much
of a big deal. OTOH the pulse parameters will be more consistent and
precise with a digital generator

My thought would be to use B0 INT to break into the pulse train. Push
buttons would be diode-OR'd to generate an interrupt from any button
press, with each button also going to its own PIC input. These inputs can
be polled to determine which button caused the interrupt and which
parameter is changed
(Continue reading)

cdb | 1 May 03:36
Picon

Re: [PIC] Project with LCD, keys and delays on PIC16F628A


:: At the first press of the Select Next/Set button, it should
:: display on the
:: two rows of the LCD this information: Width1 = 42us, Delay1 = 54us.
:: (whatever is stored in EEprom)

Not trying to pick holes, but do you really need to save parameters to 
EEPROM?  Or did you just mean the current variable contents are 
manipulated?

I only ask, as saving and reading from EEPROM is an amount of extra 
code and comes with some timing restrictions - not that that would be 
a problem in your case as the output(s) is stopped whilst in the 
button handling function.

Does this also mean that when you switch the unit on, it should 
retrieve data from EEPROM or are you just going to start from a 
default value and then the operator 'fine tunes'  from there?

Colin

--
cdb, colin <at> btech-online.co.uk on 1/05/2009

Web presence: www.btech-online.co.uk  

Hosted by:  www.1and1.co.uk/?k_id=7988359

--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
(Continue reading)

Picon
Favicon

Re: [PIC] Project with LCD, keys and delays on PIC16F628A

Jinx escreveu:
> Nick, I've had a quick read of the constructional article
>
> http://www.geotech1.com/pages/metdet/projects/hammerhead/HHv1p5.pdf
>
> and it's a lot clearer now
>
> So, there's an astable 555 running at 900Hz - 2300Hz with adjustable
> duty cycle. This pulse train drives two 74HC221 monostables, which
> in turn each output a delayed pulse with adjustable pulse width
>
> The short answer is that this can be done fairly easily with the 628
> using code suggested so far. PWM will work to replicate the original
> 555 train but as the other two need to be done in s/w you might just
> as well use s/w for all
>
> In the schematic
>
> http://www.geotech1.com/pages/metdet/projects/hammerhead/HHd1.pdf
>
> the controls are analogue (pots). It won't be possible to emulate this
> exactly using pushbuttons without some disruption to the output until the
> new values come into effect but in this app I don't think that's too much
> of a big deal. OTOH the pulse parameters will be more consistent and
> precise with a digital generator
>   

I didn't studied the circuit, but perhaps the interval between pulse
sequences (between Pulse3 and next Pulse1) is not critical.

(Continue reading)

Nick_F | 1 May 04:37
Picon

Re: [PIC] Project with LCD, keys and delays on PIC16F628A


CDB-3 wrote:
> 
> 
> :: At the first press of the Select Next/Set button, it should
> :: display on the
> :: two rows of the LCD this information: Width1 = 42us, Delay1 = 54us.
> :: (whatever is stored in EEprom)
> 
> Not trying to pick holes, but do you really need to save parameters to 
> EEPROM?  Or did you just mean the current variable contents are 
> manipulated?
> 
> I only ask, as saving and reading from EEPROM is an amount of extra 
> code and comes with some timing restrictions - not that that would be 
> a problem in your case as the output(s) is stopped whilst in the 
> button handling function.
> 
> Does this also mean that when you switch the unit on, it should 
> retrieve data from EEPROM or are you just going to start from a 
> default value and then the operator 'fine tunes'  from there?
> 
> Colin
> 
> 

Hi Colin,

I call parameters the values for pulse widths and delays for these three
pulses. The role of storing these values in EEprom is to be able to start
(Continue reading)

Jinx | 1 May 05:01
Picon

Re: [PIC] Project with LCD, keys and delays on PIC16F628A

> I didn't studied the circuit, but perhaps the interval between pulse
> sequences (between Pulse3 and next Pulse1) is not critical.
>
> If so, the code may test for keypresses only once each loop. If no key
> is pressed, it immediately starts the next sequence and no disturbance
> is seen in the pulses

I think that's true in this case because the frequency is quite low

> If a key is pressed, the interface routine is called and treats this
> keypress and returns immediately to the pulse generating routine. This
> way a small extra delay is added between two pulse sequences only
> when a key is pressed, and its results are seen immediately also

Overall, one slightly longer pulse gap won't make a noticeable or
important difference for a metal detector. One other consideration
would be debouncing the press/release with an input RC filter and
button time-out, as noise would span many cycles. 

--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist


Gmane