<tp> 10k is a good base series resistor for the bc337
<tp> dimmed the leds noticeable ??
<crest> yes
<tp> what do you mean ?
<crest> they are brighter with a 1.5k ohm base series resistor
<tp> ahh
<crest> i can pull the transistor out and put my multimeter in hFE mode
<tp> thats odd, is all this stuff from china ?
<tp> measure the transistor gain ? good idea
<crest> it is stuff left over from random projects in my local hackerspace
<tp> could you have the collector and emitter transposed ?
<crest> according to my multimeter hFE is 261
<tp> which is about right
<tp> with that kind of gain 10k should be fine
<tp> ah well
<tp> hey I was just thinking, if you looked at the F103 technical notes and found it daunting, then that means you actually understood what you saw
<tp> because it IS daunting
<tp> Ive been working on the f051 (baby cousin of the F103) since 2016 and there is still mountains I dont know
<tp> and I work on it almost every day
<crest> just let me double check if i'm too stupid to get the polarity right
<crest> looking at flat side of the transitor left pin is the emitter and it should be connected to gnd
<crest> base is in the middle
<tp> BCxxx have funny pinouts
<tp> left pin is collector
<crest> *facepalm*
<crest> did i really abuse the transitor as diode?
<tp> why not ?
<tp> I abused a bc547 so badly once the top blew off and hit me between the eyes
<crest> i just put my nose over the transistor and noticed a slight smell
<tp> hot
<tp> touch it with a fingertip ?
<crest> cold
<tp> it should be room temp at those current levels
<crest> it is
<tp> it should switch the led fine with a 10k base resistor
<crest> so the only thing that protected my poor parts was my that i fucked up twice and used an a usb <-> serial converter as power source
<tp> heheh, yeah if youd used a psu with grunt, you may have had the "BCxxx hit between the eyes" experience also
<crest> which demostrates why you want a current limited power supply
<tp> I have PSU's here (of my own design) that will do 0 - 30v at up to 30 amps
<tp> yes and USB has helped a lot here for hobbyists
<tp> limited to 500mA or 1A
<tp> iirc, when I built my first ever MCU project (a nucleonic ore flow guage) in 1974, the MCU, a National 16 bit Pace, that MCU needed 3 voltages inclucing a negative one
<crest> negative?!? did to erase some flash?
<tp> and at $270 per cpu in 1974, the fear of blowing one up was real
dave0 has joined #forth
<tp> the devices of the day used multiple supplies
<crest> *did it use that to
<tp> i believe that flash uses negative supplies to this day, it's just that the chips generate it themselves on chip
<tp> no that was just the cpu
<tp> the proms were fusible link, no eprom or flash back then
<crest> did the pace have the same crazy indirect pointer handling as the dg nova?
<tp> i dont know, I only ever added 1 and 2 to get 3 on that dev system
<tp> i was the tech assisting the engineer, I built al the hardware
<tp> the National 'Pace' development system lived in his office
<crest> if us used indirect addressing on a nova the hardware would load a 16bit word
<crest> and if the lowest bit in the address was set it would indirect again
<crest> on the original nova there was no way to break out of this if you created a circular datastructure
<tp> the only micro I knew fairly well was the 6800
<crest> the cpu would just deadlock in the microcode loop
jsoft has joined #forth
<tp> back in those days, but that was a decade after the Pace chip
<crest> i only saw one at the vintage computing assembly at 34c4
<crest> or was it at 33c3?
<tp> back in 1974, there was no internet, I had no databooks on the PACE cpu
<crest> but supposedly the system could even handle interrupts in that state
<tp> and the engineer wouldnt have let me take his one home
<crest> what was intersting about those systems with their core memory is the power failure interrupt
<crest> if you pull the power the system raises a power failure interrupt
<crest> and you have about 4000 cycles to halt the system
<tp> and at work I was supposed to be building hardware, not hanging out in the engineers office reading the PACE technical manuals
<crest> which can be used to save the registers in core memory and halt transfers and save the i/o state as well
<crest> allowing the system to continue as if nothing happend
<tp> the PACE didnt have core afaik
<crest> which was nice if the bootstrap requires the operator to enter a bootloader from the frontpanel
<crest> and yes there is a forth for the dg nova
<tp> i think there is a Forth for *everything*
iyzsong has joined #forth
<crest> i just wanted to return to the topic
<tp> :)
<tp> crest, so all your leds sorted out now ?
<crest> yes
<tp> awesome
<tp> I have a new svd2forth bitfields almost ready
<crest> what changed?
<tp> ill put it up for the f103 on my site when it's done
<tp> more intelligence in the xslt transform
<tp> I've finishing a change that does this
<crest> does it improve the generated code?
<tp> \ GPIOC_BSRR (write-only) Reset:0x00000000
<tp> : GPIOC_BSRR_BR15-CLR ( -- ) 31 bit GPIOC_BSRR ! ; \ GPIOC_BSRR_BR15, Port x reset bit
<crest> you're generating a word for every pin?!?
<tp> always have
<tp> the bitfields are a template file, one pastes what they want into their program
<tp> i transform the entire CMSIS-SVD file for any stm32
<tp> and that file includes every single bitfield
<crest> couldn't that be simplied to 15 port-c gpio-unset-pin
<tp> it is
<tp> plus it's atomic
<crest> because it uses BSRR instead of the normal data register
<crest> ?
<tp> correct~!
<tp> made for the job
<crest> why didn't they include atomic operations in the instruction set
<crest> or at least on address per atomic operation
<tp> i didnt design cortex-m :)
<crest> iirc this is the stm part and not part of cpu core
<crest> it would have been so much nicer to at least make the operation part of the adress
<tp> could well be!
<crest> one for atomic and,or,xor
<tp> programmers dream, tech use whats there
<crest> or even better provide two views of the gpio port
<crest> one with all state of a single port in one address
<crest> and a second one with a bitmap per pin
<crest> *single pin
<tp> it's probably germain to mention that the STM32F103 design is now 16 years old
<crest> even the 8bit avrs did it better
<tp> you may find more modern capabailties in more modern stm32
<crest> they do provide atomic single bit set, unset and toggle
<tp> I've no idea, the MCU I use was released in 2011
<crest> even if toggle abuses the atomic single bit set on the port input address
<crest> they probably did it because it was easier to connect the gpio port to the bus that way
<crest> probably the gpio port has expects the set/unset as single 32bit word
<crest> s/has//
<tp> I'm still amazed with the capabilities of the old F103
<crest> it's too bad that you can't use usb and can at the same time
<tp> the fact it could even be made is astounding
<tp> you can in later chips
<crest> otherwise the blue pill would make a nice usb<->can adapter
<tp> **** 16 years old *****
<tp> :)
<crest> but its the cheap crap^Wstuff i ordered half a year ago and forgot about
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
<tp> hey the stm32f103 is still incredibly popular, especially with arduino users to whoom the stm32 is so advanced, it's like alien tech
<crest> programmers always bitch and moan about hardware designs
<tp> the fact it's 16 years old only demonstrates how ancient the MEGAxxx are
<tp> yeah I know
<crest> they tend to forget that hardware has to be build $n times but software just once
<crest> if you can replace a part of hardware with a few lines of (annoying) code ...
<tp> it's always easier to just do what you want in software, the hardware is hard to do
<tp> yes, I agree
<crest> e.g. i've seen old schematics for m68k boards with dram refresh in software
<tp> it cost $1 billion a decade ago to make a new semi fab plant
<crest> it must have have been a pain in the ass to debug those boards
<crest> if your software crashes the dram is no longer refreshed
<tp> maybe they had a Forth guy on the staff ?
<tp> maybe the testing jig generated the refreshes ?
<tp> anythings possible
<crest> or they made their copper wires by pinching pennies hard enough?
<tp> I have testing gear here that changes logic states of chip outputs with brute force
<tp> called 'logic pulseing'
<tp> pulsing
<tp> it gets away with this because the pulse is so short the logic driver in the chip can take it
<tp> and the detection gear can detect it
<tp> it's saved me man years of time
Zarutian_HTC has quit [Read error: Connection reset by peer]
<tp> back in the TTL and CMOS days
Zarutian_HTC| has joined #forth
<crest> how did it save so much time?
<tp> because the only alternative was to remove the chip
<tp> which was always soldered in
<crest> tp: with 75 ohm in series with the leds the supply voltage still drops to 2.9v if all seven are on
<tp> thats ok
<crest> for the stm32 maybe
<crest> for the usb<->serial convert powering it...
<tp> it will be fine
<tp> 2.9 is close enough to 3.0 for the hardware
<tp> they dont stop because of a 0.1v drop
<tp> that's the danger with absolute numbers
<crest> it drops from 3.4v to 2.9v. a 0.5v drop
<tp> life was safer and fore fun with analog numbers ;-)
<tp> well 3.4 is much higher than you need, and I doubt it's accurate
<tp> these regulators are spot on nowadays
<tp> well the american ones are
<crest> it jumps a bit between 3.3v and 3.4v
<tp> not so sure about the Chinese stuff
<crest> it could be a fake ft232 given the adapter cost 1,x € with shipping in batches of five
<tp> crest, you have a ADC on that chip, go and measure it ?
<tp> your chip has a highly accurate voltage ref you can measure with the adc
<tp> along with the supply voltage
<crest> you can measure your supply voltage without an external voltage regulator?
<tp> sure
<crest> so it doesn't need a external reference voltage like the stupid avrs for that
<tp> the adc uses the reference for accuracy and you just use a resistive divider for the supply
<tp> I cant remember what they did in the 8 bit stone age
<tp> the adc on a stm32 is 12 bits
<crest> i didn't use AVRs because they're a good modern design
<crest> but they're accessible
<tp> yeah and they had areduino ! ;-)
<crest> even before that happend
<tp> I hate AVR's myself
<crest> i got started with avr-gcc, avrlibc and avrdude
<tp> have ever since I had to use them
<crest> and after a while i used them without the (bloated) libc
<tp> there is no disputing their hobby popularity
<tp> i think hobyists have kept the MEGAxxxx alive the last decade
<crest> all they needed is a 5v supply and a quartz
<tp> and a stm32 costing $0.56 needs neither
<crest> those hobbists go on and use what they know in other projects
<tp> yeah I know
<tp> hobbyists arent what they used to be
<tp> hmm, I feel a rant article coming on
<crest> until they complain that there is no avr with more than 8kB ram and 64kB flash for their code
<tp> hehe
<crest> what is so bad about the avr?
<tp> what is so good about the avr ?
<crest> their ease of to use with little documention
<tp> I'm fairly sure you cant think of one good technical reason that I cant show is not easily bettered by stm32
<tp> thats not a good thing
<tp> a rock needs no documentation to use as a weapon
<crest> a single chapter from a single pdf is enough to get you started on each periphery
<tp> but a m16 will easily and rapidly kill 30 people with rocks, per magazine
<crest> the hardware is easy enough to use that the documentation includes code samples in c and assembler for most things
<tp> the hardware is NOT easy to use
<tp> there is no easy to use GDB
<tp> ie no debugging
<tp> by themselves your reasons sound ok, but stm32 is vastly better
<crest> the debugging support sucks compared to what the m3 has to offer
<tp> and whats this about 'easy to use' ?
<crest> printf doesn't work in timing critical code
<crest> and toggling pins requires a logic analyzer
<tp> when was 'easy to use' a requirement for any hitech skill ?
<crest> when hobbists just want to have fun?
<tp> 'easy to use' is for morons and retarded children, people with a brain *figure it all out*
<crest> and there is avr gdb but you need a jtag adapter to use it
<tp> no, todays 'hobbysists' are not the hobbysists of yesterday
<crest> ?
<tp> remember, it was 'hobbysists' who discovered that UHF was in fact very useful
<tp> when governments considered UHF utterly usless
<crest> until they proved them wrong
<crest> and ham radio lost most of it to other users
<tp> sure
<crest> but feel free to write your avr rant
<tp> it's not a avr rant, it's a 'hobbysists' rant :)
<crest> i should go to bed before the birds get too annoying
<tp> lol
<tp> thanks for another excellent chat
<crest> (i configured my lights for 4k color temperature and drank to much mate tea)
<crest> if fell like writing it down i would like to know why you dislike avr so much
<crest> *feel
<crest> 2.2k color temp and 10% brightness is a lot better
<crest> i really should find out if there is a way to control the screen brightness as well
<crest> because i often forget to adjust my screen brigthness manually
X-Scale has quit [Quit: HydraIRC -> http://www.hydrairc.com <- It'll be on slashdot one day...]
<tabemann> hey guys
<crest> tabemann: hi
<tp> hey tabemann how goes Zeptoforth ?
<tabemann> still working on the disassembler
<tp> crest, I'll do a 'why I dont like AVR' on my site sometime
<tp> tabemann, goodness ... tell me it isnt true ;-)
<tabemann> I've been working rather slowly on it
<tp> same here with XSLT
<tabemann> there is something absolutely nummbing about enter masks, opcodes, and parsers for each instruction and addressing mode
<tp> tabemann which now does stuff like :- "\ GPIOF_BSRR (write-only) Reset:0x00000000
<tp> : GPIOF_BSRR_BR15->0 ( -- ) 31 bit GPIOF_BSRR ! ; \ GPIOF_BSRR_BR15, Port x reset bit"
<tp> tabemann, grunt work ?
<tabemann> yeah, the disassembler is definitely grunt work
Keshl has quit [Quit: Konversation terminated!]
Keshl has joined #forth
gravicappa has joined #forth
<tp> crest> couldn't that be simplied to 15 port-c gpio-unset-pin ?
<tp> crest, sorry I missed that question earlier
<tp> crest, sure it could, this is Forth and anything is possible, but the question is why do that ?
jsoft has quit [Ping timeout: 272 seconds]
<tp> crest, even at this point the language is quite low level as that instruction may end up as "motor-on"
iyzsong has quit [Ping timeout: 260 seconds]
iyzsong has joined #forth
dys has quit [Ping timeout: 246 seconds]
dddddd has joined #forth
iyzsong has quit [Quit: ZNC 1.7.1 - https://znc.in]
iyzsong has joined #forth
rdrop-exit has joined #forth
rdrop-exit has quit [Ping timeout: 256 seconds]
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #forth
iyzsong has quit [Read error: Connection reset by peer]
iyzsong has joined #forth
TCZ has joined #forth
dddddd has quit [Ping timeout: 264 seconds]
iyzsong has quit [Read error: Connection reset by peer]
TCZ has quit [Quit: Leaving]
dave0 has quit [Quit: dave's not here]
john_cephalopoda has joined #forth
<john_cephalopoda> Hey
<tp> hey john
<crest> tabemann: do you have a machine readable spec somewhere?
Zarutian_HTC| has quit [Ping timeout: 272 seconds]
X-Scale has joined #forth
dddddd has joined #forth
Zarutian_HTC has joined #forth
<crest> svd2forth mixes gsed and sed
<crest> tp: is svd2forth-v3-stm32_2019-06-29_123825_f1d08eb60b the latest release?
<crest> does your latest bluepill image use an unreleased version of svd2forth?
<crest> and where is "b32loop." defined?
jsoft has joined #forth
jsoft has quit [Ping timeout: 258 seconds]
xek has joined #forth
karswell has quit [Ping timeout: 246 seconds]
john_cephalopoda has quit [Quit: Leaving]
gravicappa has quit [Ping timeout: 260 seconds]
TCZ has joined #forth
xek has quit [Ping timeout: 256 seconds]
jsoft has joined #forth
Zarutian_HTC has quit [Quit: Bye]
Zarutian_HTC has joined #forth
dave0 has joined #forth
tp has quit [Remote host closed the connection]
TCZ has quit [Quit: Leaving]
jsoft has quit [Ping timeout: 264 seconds]