#garfield Logs
Feb 05 2013
#garfield Calendar
00:02 useless2 by Jim Butterfield Compute! September 1983
00:02 useless2 Thus, the 6509 can access over one million memory locations.
00:11 useless2 In 1990 Commodore started work on a secret project called the Commodore 65 and had MOS / CSG develop a new chip called the CSG 4510 which was little more than a slightly enhanced 8bit 6502 with two integrated 6526 I/O adapters.
00:12 useless2 In September of 1983 Jim Butterfield wrote a nice summary of the 6503, 6504, 6505, 6506, 6507, 6509, 6510 (used in the Commodore 64), 6512, 6513, 6514, and 6515 chips for Compute magazine.
00:15 rue_house kat, what would you think of just putting the two displays on the same serial chain?
00:15 rue_house it can push them both out at once
00:16 rue_house the sync isn't important cause the display stops when the ... no you still need a sync dont ya
00:16 rue_house just incase..
00:16 useless2 send 16 bits at a time? ok, but my displays are 4digit and 3digit
00:16 rue_house anyhow, I had the avr counting on the array today
00:16 rue_house I'm sending segments
00:16 rue_house it works great
00:16 useless2 the bench supply is 3 digits, the ups charger is 4 digits
00:17 rue_house oh I see
00:17 useless2 if you send only in 16 bits for four 7-seg displays, there'll be issues
00:17 useless2 and in a 3 digit display, waste
00:17 rue_house your going to just let the extra digits shift out
00:18 useless2 but 7x7 = 28, you are sending 16
00:18 useless2 err
00:18 rue_house the two clock channels is a challange
00:18 useless2 but 4x7 = 28, you are sending 16
00:18 rue_house its so fast, I'm just going 8 bits, the 8th bit is not used
00:18 useless2 why are there 2 clock channels?
00:18 rue_house 1/channel?
00:18 rue_house as we discussed?
00:18 useless2 ah
00:19 useless2 did the segment decoding fit intot he tiny85?
00:19 rue_house I think I can do the two , its a bit of a challange to sync the 'threads'
00:19 rue_house it will, sofar the program is only ..328 bytes
00:20 rue_house most of that will be the initialization code generated cause I used C
00:20 useless2 i wouldn't sync them, there's no need, and yeas, if you wanna do one pin to initiate adc on both channels and then some way to sync send both on one pin is fine
00:20 rue_house what about this
00:21 rue_house reset in, clock in, data out
00:21 useless2 one pin to tell it to do both adc, then a clock pin to sync clock out 20 bits on the 3rd pin
00:21 rue_house ----[A]-[B]-[C]-[D]--[E]-[F]-[G]-[H]
00:21 rue_house shift register chain
00:21 rue_house where ABCD is first channel and EFGH is the second channel
00:22 rue_house if you dont want the digits, you leave the register in and negate the display
00:22 useless2 the more i think , the more i wanna put the display software into the chassis cpu, not the adc tiny85
00:22 useless2 the chassis cpu can read the binary and set alarms
00:22 rue_house the idea was the isolation tho, yes?
00:22 useless2 yeas
00:23 rue_house should I keep working on this?
00:23 useless2 tiny85 up on the chargers, 50v above/delow gnd
00:23 useless2 yeas sir
00:23 rue_house k
00:23 rue_house so, what about ^^
00:23 rue_house your thining you dont want to transmit segments?
00:23 useless2 one pin to tell it to do both adc, then a clock pin to sync clock out 20 bits on the 3rd pin
00:23 rue_house dont understand the nature of the change
00:24 useless2 right, BUT the segment software will be in the cpu that reads the tiny85
00:24 rue_house well, even if you just have the 4414 act as a shift register it'll be smaller than the shift register chips
00:24 useless2 your software is not wasted, it's all useable, i just move the binary-7seg convert to the display/control cpu
00:24 useless2 yeas
00:25 rue_house the adc values are 10 bit, I'm multiplying them an extra place, so the resulting values are 15 bit (10000 and 14000 )
00:25 useless2 the 4414 replaces the shift registers, and 7447, and the display muxes
00:25 rue_house then, in converstion, I'm dropping the LSD
00:26 rue_house gee, with that much io, you dont even have to mux :)
00:27 rue_house the segment data is 32bit (4 unused bits)
00:27 useless2 umm, for ten times 4 x 4 7seg displays i don't need to mux?
00:27 rue_house oh, for the whole lot of them
00:27 useless2 err, 2x4 displays
00:27 rue_house yea, you would wanna mux that
00:27 rue_house :)
00:28 rue_house 4414 -> 4x7seg = ok
00:28 useless2 each charger will show 8 7-seg , 4 for voltgae, 4 for current
00:28 useless2 there's 10 chargers
00:28 useless2 plus there's a power out volt and current
00:30 rue_house the interrupts from the serial data offer the possability of data copy corruption (no process locking) that I'm trying to make sure dosn't happen
00:30 rue_house ok
00:30 rue_house hmm
00:30 useless2 what ints?
00:31 rue_house with two clock channels I'd have to use pin change interrupts,
00:31 useless2 it's midnite now, when my brain is usually going off, and i ate sleepy pills an hr ago, so ,, umm, i forget
00:32 useless2 what 2 clock channels?
00:32 eless2 sense dej
00:32 useless2 praps we need a pic, shall i draw one?
00:32 rue_house when the first pulse comes in for a requested channel, I have to grab the latest channel value, which I was grabbing the pre-calculated 32bit segment data, because its copied to that location one byte at a time, the interrupt could catch the system part way thru the 32bit transfer, and as a result the 4 bytes would be mixed numbers from two different samples
00:32 rue_house sounds like you want to get away from 2 clock channels now
00:33 rue_house so that can fix a number of things
00:33 rue_house this plan now sounds like an spi slave (like a ps2 keybaord), which I can use the serial subsystem for
00:33 rue_house do draw
00:33 useless2 as of yesterday when i said something like : one adc convert pin command, one clock in for syncronous serial clock out on the 3rd pin
00:34 useless2 i dunno spi, and i bet the 4414 doesn't know too
00:34 rue_house msg me a '.'
00:35 rue_house spi is OLD, even the 8048 does it
00:37 rue_house one clock pin, the master always clocks
00:37 useless2 i never used spi, i know it exists, so does twi
00:37 rue_house one 'chip select' pin, that you put low to get 'that' chip to listen, and the data line
00:37 rue_house yea
00:39 useless2 http://designerthinking.com/DSCF3140.jpg
00:40 rue_house http://www.ti.com/lit/ds/symlink/ads7866.pdf <-- page 9
00:40 useless2 there's one pin unused,, that *could* be, a "adc complete, data is ready" pin
00:40 rue_house no, 8th pin is reset
00:41 rue_house I'll have the 85 sample as fast as it can, when it gets a request, it takes the last sample and sends it
00:41 rue_house its only 2 channels, so I can use XOR mask to flip between them
00:42 rue_house I cant do HV programming, so reset has to stay reset :)
00:42 eless2 doesn't understand the XORing anything to do two
00:43 rue_house its ok, I have a bunch of the arch of those things burned into my brain
00:43 rue_house :)
00:43 useless2 i don't understand, you want me to buy two $10 ads7866 to replace one $0.88 avr?
00:44 rue_house ok so, put 'chip select' low, clock off two 16 bit samples, put chip select high
00:44 rue_house no, I was reffering to the timing diagram on page 9
00:44 rue_house figure 1
00:44 useless2 oh
00:44 rue_house we can do similar
00:44 useless2 did you see the pic i drew?
00:44 rue_house yes, I think were on the same page
00:44 useless2 ok
00:44 rue_house just mine is a pdf and yours is a postit
00:45 useless2 yeas
00:48 rue_house ok, its not quite native for the chip, but its easy for me to do
00:48 rue_house :) I'v never had two avrs talk to each other
00:50 useless2 don't think of it as avr-to-avr talking, it could be anything sending the convert and clk signals
00:51 rue_house well yes,
00:51 useless2 specially since they'll be optocoupled in and out of each circuit
00:51 rue_house in this case an 4414 talking to a few 85's
00:51 eless2
00:52 rue_house its cool, good prep for the mecha code
00:52 useless2 course, i may wanna sprinkle them around too: sunlight and temperature, windspeed and rainfall, height and temperatur, etc
00:53 rue_house :)
00:53 useless2 i might wanna move it into a tiny45, where there's more adc
00:54 rue_house hey, where do you want to do the scale math?, I was gonna do it all on the 85
00:54 useless2 do the chips do a sample and convert on each channel at the same time, or is it one acd, and a mux on it's input?
00:54 rue_house tiny26 is best value/channel
00:54 rue_house its muxed
00:54 useless2 ouch
00:54 rue_house I run the adc in a sample loop with the converstion complete interrupt
00:54 useless2 how long from one adc to the next?
00:55 rue_house its successive approx, 65 to 260us/conversion
00:55 rue_house so "up to 15ksps"
00:56 useless2 260us = 3846 sps
00:56 useless2 good enough for dc and 60hz
00:56 rue_house its more than fast enough for the digital loop on my hexapod
00:56 eless2
00:57 rue_house but your using it for displays! :)
00:57 useless2 i won't stare at it that long
00:57 rue_house I have all the code for the display muxing, BUT, it gets a bit clickerie past 6 or 7 digits (the duty gets so low)
00:58 eless2 looks at her front paws and notes those racoons really had a great idea when it comes to washing
00:58 rue_house I made an 8 digit clock and it was kinda annoying
00:59 rue_house I wonder what the 8th digit was
00:59 useless2 yeas, hence the 74374, i can switch the output enable pin to dim the display
00:59 rue_house and the 7th...
00:59 rue_house as long as you dont do that while shifting data into them (nolonger an issue)
01:00 rue_house :)
01:00 useless2 the displays will be on pcb anyhow, and the SO packale latch will easily fit tween the pins of the displays, so it doesn't cost much
01:00 rue_house oh, you want to just strobe the digits into 1latch/display?
01:00 useless2 that's what i will prolly do
01:01 rue_house there goes any flicker problem
01:01 useless2 there's a *lot* of 7seg displays for the batt charger
01:01 rue_house well, with two 8 bit ports, you can run 7segment+dp x 256 displays
01:01 useless2 4x2x11 displays
01:02 useless2 yeas, the 44414 is a good fit for that project's displays
01:02 rue_house if you have 574 you can flatten them out , one side to the display, the other side to a bus
01:02 useless2 and there's pins left over for remote alarms, temperature sensors, fan rpm, etc
01:03 rue_house I'm gonna run out of breadbaords prototyping this
01:03 rue_house hehe :)
01:03 useless2 i have 100's of ribbon cables already made up for them from cableboxes
01:03 useless2 iirc, 20 conductor
01:04 rue_house do you have 74--154?
01:04 useless2 yeas
01:04 rue_house thats 4 to 16 right?
01:04 useless2 yeas
01:04 rue_house (oh go, I'm losing it)
01:04 rue_house ^d
01:04 useless2 138 is 3-8, and each charger has 8 7-seg displays
01:04 rue_house I used to know most of them off the top of my head
01:05 rue_house I dont have any 4414 ....
01:05 useless2 but unles i *try* to waste copper, the 20 conductor ribbon cables are plenty, no matter where i put the 138 or 154
01:05 rue_house I might be abel to make a good guess on the code tho
01:06 rue_house oh I might have an 8515, its quite similar
01:06 rue_house gnight
01:07 eless2 thinks a 138 on the bottom 3 to select 1 of 8 7seg on each charger, then 154 to select 1 of 11 display mod
01:07 useless2 that's 7 bits on one of the 4414's 8bit ports
01:07 useless2 gnite
01:12 rue_bed one clock line from the 4414 out to all 85's in parallel, the optos can all pull down a single data line with a pullup resistor, 8 lines for segments out, 7 lines for display register addressing, and then you just need chip select lines for all the 85's
01:14 rue_bed your not much passed 3 ports
03:58 Tom_itx rue_bed, remember you are still running at 1Mhz
03:58 Tom_itx you can always change ckdiv8
15:07 Tom_itx the data sheet for the atmega8515 is still available. it is a pin compatible replacement for the 4414 with additional features
15:07 Tom_itx the 4414 data sheet is no longer available
15:07 Tom_itx you can use the 8515 one for most of your needs i think
16:47 useless2 http://designerthinking.com/AT90S4414.pdf
17:11 Tom_itx how recently did you find that?
17:11 useless2 ~5 yrs ago , when i got the 4414's and the dragon and stk-500
17:12 Tom_itx probably good you did since it's not up there now
17:12 useless2 up where?
17:12 Tom_itx and my bud said he didn't see it in the archives
17:12 Tom_itx at atmel
17:12 useless2 i mined atmel
17:13 useless2 stuff disapepars from the internets every day, if you see something you might want, save it
17:13 Tom_itx i usually do
17:14 Tom_itx i wish i had all my logic books i threw out
17:14 useless2 which do you need?
17:14 Tom_itx none atm
17:15 useless2 i have an 8ft long bookshelf of old databooks i can prolly be ok without
17:15 Tom_itx i don't need any, no room to store them
17:16 eless2 suggests moving the kids down to the basement, and converting the upstairs rooms (or the attic) into a lib
17:20 Tom_itx similar pinout to the mega32
17:20 Tom_itx but not quite
17:20 Tom_itx they moved the + and GND to the middle instead of the corners
17:20 Tom_itx along with the xtal pins
17:20 Tom_itx the ports appear the same or similar
17:21 Tom_itx it appears avr gcc supports the 4414
17:22 Tom_itx /* avr/io4414.h - definitions for AT90S4414 */
17:22 Tom_itx your blinky would work on it
17:23 Tom_itx save the external crystal required
17:23 eless2 has two 4Mhz xtals here by her left
17:23 Tom_itx you should grab a copy of winavr unless you have already
17:24 Tom_itx at that sorceforge site i posted
17:24 Tom_itx it will let you compile the c stuff
17:24 useless2 there's 3 to 10 xtals in each cable box, even in the 3-5Mhz and 7-12Mhz and 24-33Mhz ranges
17:24 Tom_itx wonder what the 'ALE' pin is for
17:25 Tom_itx it was replaced on the 32 with AVCC
17:25 useless2 address latch enable
17:25 Tom_itx you sure?
17:25 useless2 not sure on the 4414
17:25 Tom_itx adobe doesn't let me search that pdf
17:28 useless2 it's an image file only
17:28 useless2 see page 4
17:29 Tom_itx ahh ok
17:29 Tom_itx they must not have external adc reference then
17:29 useless2 they don't have any adc at all
17:29 Tom_itx the pinout indicates adc or comparator
17:29 Tom_itx AD0..AD7
17:30 Tom_itx or are those addresses
17:30 useless2 AD = address/data
17:30 Tom_itx for the external ram access
17:30 Tom_itx ok
17:30 Tom_itx the 128 does that
17:31 useless2 for the 4414, on the 16bit buss, the lower address and the 8bit data are on port A , the upper 8 of the address are on port C
17:31 Tom_itx saw that on P1
17:32 Tom_itx gonna go shower
17:32 useless2 the addy appears on the pins, then ALE appears, then the addy goes away and the data is present
17:32 useless2 k
17:32 Tom_itx i got a 6811 that will access 32k
17:32 Tom_itx and additional io memory mapped
17:33 useless2 with a lil glue logic and trickery, the 4414 could access 2^32 bytes of external ram
17:33 useless2 if i wanted a real project, i'd make it access even more
17:35 useless2 with the 6502, you can inject new opcodes that the glue logic can use, like fetch bytes above the normal 2^16 addy range
17:58 Tom_itx has he given you any 7seg code?
19:05 useless2 no
19:24 useless2 FedEx has a fleet of 654 aircraft with a lift capacity of 26.5 million pounds daily. A solid-state laptop drive weighs about 78 grams and can hold up to a terabyte.
19:24 useless2 That means FedEx is capable of transferring 150 exabytes of data per day, or 14 petabits per second—almost a hundred times the current throughput of the internet.
19:25 useless2 a FedEx fleet loaded with MicroSD cards could transfer about 177 petabits per second, or two zettabytes per day—a thousand times the internet’s current traffic level.
20:06 Lola8088 Yeah... of totally inaccessable data.
20:07 rue_house mm
20:07 rue_house would need a lot of people plugging them in
20:07 Lola8088 hi hi hi hi hi hi hi hi hi hi
20:07 rue_house hi
20:08 Lola8088 my son has a mouthful of green beans and he won't give them up or swallow them
20:09 rue_house hmmmm
20:09 rue_house I bet something happens if you put a tomato infront of him
20:10 Lola8088 I tempted him with so many things... he's had it in there for half an hour... he wouldn't even give it up for a cookie.
20:10 Lola8088 we are making valentines to mail to various grandmothers
20:11 Tom_itx how old is he?
20:11 Tom_itx 3?
20:11 rue_house huh
20:11 Tom_itx sounds like it
20:11 Lola8088 17months
20:12 useless2 prolly ok till he doses off and inhales one
20:22 Tom_itx 1st kid?
20:23 Lola8088 Second... I have a daughter who's 7
20:24 Lola8088 Tom_itx: do you have kids?
20:25 Tom_itx a couple
21:09 eless2 slowly looks around with no en
21:17 Tom_itx rue_house, where did you wire the dp?
21:39 Tom_itx mmm that's not a mega32 pinout
22:37 Tom_itx rue_house, all mine are 'blinking' 8888
22:37 Tom_itx i moved ports but your code is the same
22:40 Tom_itx common cathode
22:51 rue_house sorry, I'm back
22:51 rue_house blinking?
22:55 rue_house I seem to have caught a bug, feel asleep
22:55 rue_house wonder what I have...
22:59 rue_house Tom_itx,
22:59 rue_house kat, adjusting your sleep schedule eh?
23:11 useless2 isn't working
23:12 rue_house :) I think its got a hefty slew rate